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

编程入门 行业动态 更新时间:2024-10-20 06:17:45
本文介绍了.Net Core 1.1.0 NuGet程序包无法在Visual Studio Mac中安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在Visual Studio Mac Preview中使用ASPNet.Core 1.1.0应用程序,但无法更新/安装NuGet软件包。

I'm playing around with a ASPNet.Core 1.1.0 application in Visual Studio Mac Preview and have problems updating/installing NuGet packages.

如果我尝试更新例如从1.0.0到1.1.0的Microsoft.AspNetCore.Diagnostics,下载失败并完全删除了程序包。然后,我必须再次下载并安装1.0.0的软件包。 Microsoft.AspNetCore.Server.Kestrel也是如此。

If I try to update eg. Microsoft.AspNetCore.Diagnostics from 1.0.0 to 1.1.0 it fails the download and removed the package completely. I then have to download and install the package for 1.0.0 again. Same goes for Microsoft.AspNetCore.Server.Kestrel.

Microsoft.EntityFrameworkCore我无法安装任何版本。 此处是异常输出: gist.github/anonymous/52ceb28b8d9781835b226bcbe9d04d58

Microsoft.EntityFrameworkCore I'm not able to install in any version. Heres the exception output: gist.github/anonymous/52ceb28b8d9781835b226bcbe9d04d58

我知道一切都已经准备就绪,但是我想知道其他人是否也遇到了同样的问题并且知道解决方法/解决方案。

I know everything is right out of the oven, but was wondering if other people have experienced the same issues and know of a workaround/solution.

推荐答案

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

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

  • 首先安装.NET Core 1.1.0: www.microsoft/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.在此处下载: github/dotnet/core/blob/master/release-notes/preview3-d ownload.md

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

  • 在Visual Studio Mac中创建新项目

  • 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>

  • 在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/

    更多推荐

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

    本文发布于:2023-11-14 15:00:24,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1587658.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:程序包   Net   Core   NuGet   Mac

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!