StarBlog Blog Development Notes (2): Environment Setup and Project Creation
Series articles Developing the StarBlog Blog Project Based on .NetCore - (1) Why Write Your Own Blog? Developing the StarBlog Blog Project Based on .NetCore - (2) Environment Setup and Project Creation ... Developing the StarBlog Blog Project Based on .NetCore - API Response Wrapping Developing the StarBlog Blog Project Based on .NetCore - Image Upload Feature Developing the StarBlog Blog Project Based on .NetCore - Authentication
目录5 个章节
Series Articles
- Developing the StarBlog Blog Project Based on .NetCore - (1) Why Write Your Own Blog?
- Developing the StarBlog Blog Project Based on .NetCore - (2) Environment Setup and Project Creation
- ...
- Developing the StarBlog Blog Project Based on .NetCore - API Response Wrapping
- Developing the StarBlog Blog Project Based on .NetCore - Image Upload Feature
- Developing the StarBlog Blog Project Based on .NetCore - Authentication Feature
- Developing the StarBlog Blog Project Based on .NetCore - Frontend Related
- Developing the StarBlog Blog Project Based on .NetCore - Frontend Development (1) Preparation
- Developing the StarBlog Blog Project Based on .NetCore - Frontend Development (2) Page Routing
- Developing the StarBlog Blog Project Based on .NetCore - Frontend Development (3) SASS and SCSS
- Developing the StarBlog Blog Project Based on .NetCore - Frontend Development (4) FontAwesome Icons
- Developing the StarBlog Blog Project Based on .NetCore - Frontend Development (5) Axios Network Request Encapsulation
- Developing the StarBlog Blog Project Based on .NetCore - Frontend Development (6) Login Page
- Developing the StarBlog Blog Project Based on .NetCore - Frontend Development (7) Main Page
- Developing the StarBlog Blog Project Based on .NetCore - Frontend Development (8) Vuex and State Management
- Developing the StarBlog Blog Project Based on .NetCore - Frontend Development: File Upload
- Developing the StarBlog Blog Project Based on .NetCore - Frontend Development: Waterfall Image List
- Developing the StarBlog Blog Project Based on .NetCore - Frontend Development: Navigation Guards
- ...
Preface
After the previous article (Developing the StarBlog Blog Project Based on .NetCore - (1) Why Write Your Own Blog? Pinned) was published on cnblogs and my WeChat official account, it received a lot of attention from many experts, and the code published on GitHub also gained dozens of stars. This has greatly encouraged me and given me more motivation to polish this project and write this series of blog posts well~
In fact, 60% of the articles in this series have already been completed, but most of them focus on frontend development (the admin side). As for the backend development part, because I wrote the code too quickly in the early stages and didn't take notes, I now want to write up the backend development part first and then publish them one by one.
This series of blog posts assumes that readers have basic knowledge of using the Asp.Net Core framework (both MVC and WebApi are involved). For an introduction to the Asp.Net Core framework, you can refer to my previous blog posts:
- Asp.Net Core Quick Start (1) MVC Introduction
- Asp.Net Core Quick Start (2) Views, Models, Persistence, Files, Error Handling, Logging
As well as the "AspNetCore Study Notes" and "AspNetCore Development Notes" series on the WeChat official account.
This article introduces the environment setup and project creation process before developing the StarBlog blog. Although it doesn't have much technical content, it's an article that has to be written. Readers can just skim through it and skip ahead~
Environment Setup
The backend of this project is based on the .Net6 version. If you haven't installed it yet, you can download it from Microsoft's official website at: https://dotnet.microsoft.com/zh-cn/download
As for the IDE, I usually prefer JetBrains' Rider. Of course, most .Net developers probably use VS (but I suggest you try Rider when you have time, it's really quite good~). Both of these are highly efficient for development. A second-tier choice is VS Code, which is fine for coding simple demo projects, but for larger projects it's still better to use Rider or VS.
Getting Started
Use an IDE or the command line to create an empty solution
I'm more used to using Rider
Creating a project with an IDE is easy, so I won't go into details. Here I'll cover the command-line approach.
First, create a directory
mkdir StarBlog
Create a solution
cd StarBlog
dotnet new sln
You can see that the file StarBlog.sln has been created in the StarBlog directory
Next, continue to create a few projects
# 一些额外的工具代码
dotnet new classlib -o StarBlog.Contrib
# 数据访问相关的代码、数据库模型等
dotnet new classlib -o StarBlog.Data
# 博客迁移(Markdown文件夹导入博客网站)工具代码
dotnet new console -o StarBlog.Migrate
# 博客网站主体项目
dotnet new web -o StarBlog.Web
For more usage of the dotnet new command, you can refer to the official documentation: https://docs.microsoft.com/zh-cn/dotnet/core/tools/dotnet-new
After creation is complete, the directory structure is as follows
StarBlog
├── StarBlog.Contrib
├── StarBlog.Data
├── StarBlog.Migrate
├── StarBlog.Web
└── StarBlog.sln
ok
OK, that's all for this article. The following articles will start writing code. Stay tuned~
Meanwhile, all the project code has been uploaded to GitHub. Feel free to Star/Fork!
- Blog backend + frontend project URL: https://github.com/Deali-Axy/StarBlog
- Admin frontend project URL: https://github.com/Deali-Axy/StarBlog-Admin
_EOF_
StarBlog Blog Development Notes (2): Environment Setup and Project Creation
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
StarBlog博客开发笔记(17):自动下载文章里的外部图片
系列文章 基于.NetCore开发博客项目 StarBlog - (1) 为什么需要自己写一个博客? 基于.NetCore开发博客项目 StarBlog - (2) 环境准备和创建项目 基于.NetCore开发博客项目 StarBlog - (3) 模型设计 基于.NetCore开发博客项目 StarBlog - (4) markdown博客批量导入 基于.NetCore开发博客项目 StarBl
2022-08-14 · StarBlog博客开发笔记 · 约 1 分钟
StarBlog博客开发笔记(15):生成随机尺寸图片
系列文章 基于.NetCore开发博客项目 StarBlog - (1) 为什么需要自己写一个博客? 基于.NetCore开发博客项目 StarBlog - (2) 环境准备和创建项目 基于.NetCore开发博客项目 StarBlog - (3) 模型设计 基于.NetCore开发博客项目 StarBlog - (4) markdown博客批量导入 基于.NetCore开发博客项目 StarBl
2022-07-18 · StarBlog博客开发笔记 · 约 1 分钟
StarBlog博客开发笔记(13):加入友情链接功能
系列文章 基于.NetCore开发博客项目 StarBlog - (1) 为什么需要自己写一个博客? 基于.NetCore开发博客项目 StarBlog - (2) 环境准备和创建项目 基于.NetCore开发博客项目 StarBlog - (3) 模型设计 基于.NetCore开发博客项目 StarBlog - (4) markdown博客批量导入 基于.NetCore开发博客项目 StarBl
2022-06-28 · StarBlog博客开发笔记 · 约 1 分钟
StarBlog博客开发笔记(20):图片显示优化
前言 我的服务器带宽比较高,博客部署在上面访问的时候几乎没感觉有加载延迟,就没做图片这块的优化,不过最近有小伙伴说博客的图片加载比较慢,那就来把图片优化完善一下吧~ 目前有两个地方需要完善 图片瀑布流 图片缩略图 图片瀑布流 关于瀑布流之前的文章有介绍: 基于.NetCore开发博客项目 StarBlog - (10) 图片瀑布流 不过当时直接套用的 Bootstrap5 例子代码,有偶尔显示错位
2022-11-27 · StarBlog博客开发笔记 · 约 1 分钟
讨论
共 0 条加载评论中…