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 许可协议。转载请注明出处!
相关文章
基于.NetCore开发博客项目 StarBlog - (30) 实现评论系统
开发者终于更新评论系统,代码量庞大只贴关键逻辑,GitHub自便。前端ElementUI与Bootstrap风格冲突,却称和谐?评论需邮箱验证码,审核流程繁琐,自动不通过还得人工。
2025-04-27 · StarBlog博客开发笔记 · 约 1 分钟
StarBlog博客开发笔记:身份认证功能
身份认证使用JWT,关于AspNetCore的身份认证和JWT可以看看我之前这篇博客 先安装nuget包 dotnet add package Microsoft.AspNetCore.Authentication.JwtBearer 在Services目录下新建一个AuthService类,先留着不写代码,等把准备工作完成了再来。 用户模型 在 StarBlog.Data 项目的 Models
2022-02-25 · StarBlog博客开发笔记 · 约 1 分钟
StarBlog博客开发笔记(16):一些新功能
系列文章 基于.NetCore开发博客项目 StarBlog - (1) 为什么需要自己写一个博客? 基于.NetCore开发博客项目 StarBlog - (2) 环境准备和创建项目 基于.NetCore开发博客项目 StarBlog - (3) 模型设计 基于.NetCore开发博客项目 StarBlog - (4) markdown博客批量导入 基于.NetCore开发博客项目 StarBl
2022-08-13 · StarBlog博客开发笔记 · 约 1 分钟
StarBlog博客开发笔记(3):模型设计
系列文章 基于.NetCore开发博客项目 StarBlog - (1) 为什么需要自己写一个博客? 基于.NetCore开发博客项目 StarBlog - (2) 环境准备和创建项目 基于.NetCore开发博客项目 StarBlog - (3) 模型设计 ... 基于.NetCore开发博客项目 StarBlog - 接口返回值包装 基于.NetCore开发博客项目 StarBlog - 上传
2022-04-22 · StarBlog博客开发笔记 · 约 1 分钟
讨论
共 0 条加载评论中…