System could not be found Visual Studio 2017 ASP.NET Core project

前端 未结 20 1674
太阳男子
太阳男子 2020-12-14 05:50

I\'ve installed the newly released version of Visual Studio 2017 and started a fresh ASP.NET Core project targeting .NET Core.

Out of the box, I\'m getting the

相关标签:
20条回答
  • 2020-12-14 06:21

    Came across the same issue today. I had an old nuget source that no longer existed. So I went into Tools > Nuget Packet Manager and un-checked the wrong one. Hit "Ok", and then rebuilt the project, and it works great now. It seems like you stumbled onto it, but also wanted to verify that it fixed my issue, and it does.

    0 讨论(0)
  • 2020-12-14 06:23

    None of the answers here worked for me so I'm posting what did work. My errors were mostly the same as the original poster but I also had:

    Error loading meta data for 'Microsoft.Extensions.FileProviders.Embedded.2.0.1' hexadecimal value 0x1C invalid character

    Every time I attempted to download a different nuget package or restore old packages I would see this error. I also saw the other errors such as:

    type or namespace system could not be found


    What worked for me:

    1. opened the filepath that the error said the bad metadata was in, which for me was C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.fileproviders.embedded\2.0.1
    2. Then, I put the contents of that folder into another folder I named "hiding".
    3. Then, I went back to the nuget package manager and tried to install a package, hoping to have the SDK restored. IOt worked successfully, and all my other errors were gone as well, and the fresh new project runs as it should!
    0 讨论(0)
提交回复
热议问题