且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否可以在未安装Visual Studio的Windows服务器上构建.NET Core应用程序?

更新时间:2023-10-16 10:09:28

是的,您可以在未安装Visual Studio的情况下构建.NET Core应用程序。 (我一直在Mac上做!)

Yes, you can build .NET Core applications without Visual Studio installed. (I've been doing it on my Mac!)

您需要。NET Core SDK 。仔细检查您是否拥有最新版本:

You need the .NET Core SDK installed for your platform. Double check that you have the latest version:

dotnet --version
2.0.2

然后,您可以进入项目目录(包含 .csproj $ c的文件夹$ c>文件)并运行:

Then, you can go into your project directory (the folder that contains your .csproj file) and run:

dotnet build

或以发布模式构建:

dotnet build -c Release