Netcore 2.1.1 release leads to app failing to run

后端 未结 7 1538
再見小時候
再見小時候 2020-12-24 03:09

It seems there is suddenly something out of sync with asp.net core packages.

It looks like Microsoft.AspNetCore.App 2.1.1 was released 16 hours ago on nuget.org but

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-24 03:33

    The wildcard version number package references is weird to me. That doesn't happen by default, so either you or one of your team members did that. I don't know if that's the source of at least some of your issues or not, but I'd start by changing them to full version references. NuGet packages are not committed with your project, so having wildcards can lead to strange build issues, particularly in automated builds, when you're developing against one version but a different version is restored later. If you want to upgrade a package, that should be an explicit choice, so you can then verify that all your code still functions as it should post-upgrade.

    Also worth noting, since 2.1, code generation has been rolled in, so you should not be explicitly referencing any CodeGen packages.

    As far as solving the current issue goes. You may be having some issues with your package cache. In Visual Studio, go to Tools > NuGet Package Manager > Package Management Settings, and then click the "Clear All NuGet Cache(s)" button.

    That should prompt a redownload of all your projects NuGet packages, and may be enough to solve the issue. If not, I'd recommend cleaning all your projects and then going into the directory for each and manually deleting both the bin and obj directories. Then, rebuild your solution.

提交回复
热议问题