且构网

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

.Net Core 1.1.0 NuGet程序包无法在Visual Studio Mac中安装

更新时间:2023-02-09 08:23:44

对于其他遇到类似问题的人,以下是逐步介绍:

For everyone else having similar problems, here's a walk-through:


  1. 首先安装.NET Core 1.1.0: https://www.microsoft.com/net/core#macos

.NET Core 1.1.0官方安装程序(截至撰写本文时)包括.NET Core SDK 1.0.0 Preview 2。

The official .NET Core 1.1.0 installer (as of when this is written) includes the .NET Core SDK 1.0.0 Preview 2.

您将需要.NET Core SDK 1.0.0预览版3.在此处下载: https://github.com/dotnet/core/blob/master/release-notes/preview3-d ownload.md

You will need .NET Core SDK 1.0.0 Preview 3. Download it here: https://github.com/dotnet/core/blob/master/release-notes/preview3-download.md


  1. 在Visual Studio Mac中创建新项目

  1. Create a new project in Visual Studio Mac

关闭项目

打开project / src / myapp / myapp.csproj并更改 netcoreapp1。 0到 netcoreapp1.1。保存并关闭文件。

Open up project/src/myapp/myapp.csproj and change "netcoreapp1.0" to "netcoreapp1.1". Save and close the file.

< TargetFramework> netcoreapp1.1< / TargetFramework>


  1. 在Visual Studio Mac中打开解决方案并进行编译。

现在,您将能够将NuGet软件包更新到最新版本。

Now you will be able to update your NuGet packages to newest versions.

应该运行遇到问题时,站在/ project / src / myapp /

Should you run into problems, do a "dotnet restore" when standing in /project/src/myapp/