简体   繁体   English

Nuget包“此源中不可用”……但是VS仍然知道吗?

[英]Nuget package “Not available in this source”… but VS still knows about it?

I've come across a screen that I've never seen before, while playing with Npgsql.EntityFrameworkCore.PostgreSQL source code, looking for a bug that's blocking my app from running properly. 在玩Npgsql.EntityFrameworkCore.PostgreSQL源代码时,我遇到了一个从未见过的屏幕,寻找导致我的应用无法正常运行的错误。

As things stand right now, I can't even build the source code. 就目前而言,我什至无法构建源代码。

屏幕截图

I can't build this code, because the packages can't be found; 我无法构建此代码,因为找不到软件包。 yet, Visual Studio knows that the latest release is the one I want. 但是,Visual Studio知道最新版本是我想要的版本。 How is this possible? 这怎么可能? What (if anything) can I do to get the packages installed? 我可以做什么(如果有的话)来安装软件包?

Nuget package “Not available in this source”… but VS still knows about it? Nuget包“此源中不可用”……但是VS仍然知道吗?

You should select nuget.org as package source, not All . 您应该选择nuget.org作为包源,而不是All Tseng pointed the correct direction. 曾荫权指出了正确的方向。 You probably have a myget feed in your project/Visual Studio. 您的项目/ Visual Studio中可能有一个myget提要。

According to the package Microsoft.EntityFrameworkCore on the nuget.org, the latest version is only 2.1.0-preview1-final (current version) not have the version 2.1.0-preview3-32169 . 根据nuget.org上的Microsoft.EntityFrameworkCore软件包,最新版本仅为2.1.0-preview1-final (current version)而没有版本2.1.0-preview3-32169 So the package you have installed is not comes from nuget.org. 因此,您安装的软件包不是来自nuget.org。

If you add a custom nuget feed with source: https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json 如果您添加带有源的自定义nuget提要: https ://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json

Then you will see the version 2.1.0-preview3-32169 . 然后,您将看到版本2.1.0-preview3-32169

So, to resolve this issue, you should select the nuget.org as package source or disable the package source from dotnet.myget.org. 因此,要解决此问题,应选择nuget.org作为程序包源,或从dotnet.myget.org禁用程序包源。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM