一个网站的后台怎么做,网站建设厦门,湛江小程序公司,做网站可以赚钱吗知乎.NET简介.NET 是一种用于构建多种应用的免费开源开发平台#xff0c;例如#xff1a;Web 应用、Web API 和微服务云中的无服务器函数云原生应用移动应用桌面应用1). Windows WPF2). Windows 窗体3). 通用 Windows 平台 (UWP)游戏物联网 (IoT)机器学习控制台应用Windows 服务跨… .NET简介.NET 是一种用于构建多种应用的免费开源开发平台例如Web 应用、Web API 和微服务云中的无服务器函数云原生应用移动应用桌面应用1). Windows WPF2). Windows 窗体3). 通用 Windows 平台 (UWP)游戏物联网 (IoT)机器学习控制台应用Windows 服务跨平台可以为许多操作系统创建 .NET 应用包括WindowsmacOSLinuxAndroidiOStvOSwatchOS支持的处理器体系结构包括X64x86ARM32ARM64开源.NET 是开放源代码使用 MIT 和 Apache 2 许可证。.NET 是 .NET Foundation 的项目。有关详细信息请参阅GitHub.com 上的项目存储库列表和文档。以上信息来自.NET文档概述例行吹嘘.NET到此结束下面进入本文的正题下载安装.NET5之后在命令行中运行以下命令dotnet
如果安装成功你会看到以下的输出Usage: dotnet [options]
Usage: dotnet [path-to-application]Options:-h|--help Display help.--info Display .NET information.--list-sdks Display the installed SDKs.--list-runtimes Display the installed runtimes.path-to-application:The path to an application .dll file to execute.
然后再运行以下命令dotnet new -l
你会看到以下输出Templates Short Name Language Tags
-------------------------------------------- ------------------- ------------ -------------------------------
Console Application console [C#], F#, VB Common/Console
Class library classlib [C#], F#, VB Common/Library
WPF Application wpf [C#] Common/WPF
WPF Class library wpflib [C#] Common/WPF
WPF Custom Control Library wpfcustomcontrollib [C#] Common/WPF
WPF User Control Library wpfusercontrollib [C#] Common/WPF
Windows Forms (WinForms) Application winforms [C#] Common/WinForms
Windows Forms (WinForms) Class library winformslib [C#] Common/WinForms
Worker Service worker [C#], F# Common/Worker/Web
Unit Test Project mstest [C#], F#, VB Test/MSTest
NUnit 3 Test Project nunit [C#], F#, VB Test/NUnit
NUnit 3 Test Item nunit-test [C#], F#, VB Test/NUnit
xUnit Test Project xunit [C#], F#, VB Test/xUnit
Razor Component razorcomponent [C#] Web/ASP.NET
Razor Page page [C#] Web/ASP.NET
MVC ViewImports viewimports [C#] Web/ASP.NET
MVC ViewStart viewstart [C#] Web/ASP.NET
Blazor Server App blazorserver [C#] Web/Blazor
Blazor WebAssembly App blazorwasm [C#] Web/Blazor/WebAssembly
ASP.NET Core Empty web [C#], F# Web/Empty
ASP.NET Core Web App (Model-View-Controller) mvc [C#], F# Web/MVC
ASP.NET Core Web App webapp [C#] Web/MVC/Razor Pages
ASP.NET Core with Angular angular [C#] Web/MVC/SPA
ASP.NET Core with React.js react [C#] Web/MVC/SPA
ASP.NET Core with React.js and Redux reactredux [C#] Web/MVC/SPA
Razor Class Library razorclasslib [C#] Web/Razor/Library
ASP.NET Core Web API webapi [C#], F# Web/WebAPI
ASP.NET Core gRPC Service grpc [C#] Web/gRPC
dotnet gitignore file gitignore Config
global.json file globaljson Config
NuGet Config nugetconfig Config
Dotnet local tool manifest file tool-manifest Config
Web Config webconfig Config
Solution File sln Solution
Protocol Buffer File proto Web/gRPC
我们可以看到可用的 SPA 模板只支持 angular 和 reactTemplates Short Name Language Tags
-------------------------------------------- ------------------- ------------ -------------------------------
ASP.NET Core with Angular angular [C#] Web/MVC/SPA
ASP.NET Core with React.js react [C#] Web/MVC/SPA
ASP.NET Core with React.js and Redux reactredux [C#] Web/MVC/SPA
问题来了我们如何使用 dotnet 命令创建基于 Vuejs 的 SPA 项目呢我在 GitHub 上创建了一个项目dotnet-vue相关的包已经发布到 nuget.org只需要执行以下命令即可创建一个基于 Vuejs 的 SPA 项目。项目基于以下技术构建请先下载安装.NET 5.0Node.jsVue.jsYarn安装DotnetVue包dotnet new --install DotnetVue::1.2.0
然后再运行以下命令dotnet new -l
你会看到以下输出Templates Short Name Language Tags
-------------------------------------------- ------------------- ------------ -------------------------------
ASP.NET Core with Vue vue [C#] Web/WebAPI/SPA/Vue
创建新项目dotnet new vue -o Lemon.Blog.Web
然后执行运行命令cd Lemon.Blog.Web
dotnet run
在浏览器上访问地址http://localhost:5000/效果如下使用 dotnet 命令创建基于 Vuejs 和 ElementUI 的后台管理项目我在 GitHub 上创建了一个项目dotnet-element-admin相关的包已经发布到 nuget.org只需要执行以下命令即可创建一个基于 Vuejs 的 SPA 项目。安装DotnetElementAdmin包dotnet new --install DotnetElementAdmin::1.0.2
然后再运行以下命令dotnet new -l
你会看到以下输出Templates Short Name Language Tags
-------------------------------------------- ------------------- ------------ -------------------------------
ASP.NET Core with ElementAdmin element-admin [C#] Web/WebAPI/SPA/Vue/ElementAdmin
创建新项目dotnet new element-admin -o Lemon.BlogAdmin.Web
然后执行运行命令cd Lemon.BlogAdmin.Web
dotnet run
在浏览器上访问地址http://localhost:5000/效果如下相关链接dotnet-vuedotnet-element-admin.NET 5.0Node.jsVue.jsYarn