Type universe cannot resolve assembly: System.Configuration AND Cannot resolve Assembly or Windows Metadata file 'System.Configuration.dll

前端 未结 5 1550
轮回少年
轮回少年 2021-02-05 09:14

I am developing UWP App via VS2015 in Win10. My App was running perfect, but just today when I start running my App, even I didn\'t make changes of such ... and It shows 2 error

相关标签:
5条回答
  • 2021-02-05 09:28

    I was able to resolve this by checking "Automatically check for missing packages during build in Visual Studio" (the "Allow NuGet to download missing packages" was already checked), then rebuilding. You can find these settings in Tools --> NuGet Package Manager --> Package Manager Settings.

    0 讨论(0)
  • 2021-02-05 09:28

    I fixed a similar problem by deleting the C:\Users\%username%.nuget directory.

    0 讨论(0)
  • 2021-02-05 09:37

    I ran across this in a somewhat dated build script. It was a build that used one top-level SLN composed of multiple SLN files from numerous projects and efforts. I used to be able to just do,

    call nuget restore "%Top_Level_SLN_File%" -Recursive

    and trust all the packages were getting restored. Now I have to run,

    for /r %%I IN (*.sln) DO call nuget restore "%%~I" -Recursive

    It might have to do with the fact that a private nuget feed is being leveraged for some of the packages, but that might be a red herring. I haven't deep-dived the issue to get minimal repro steps.

    0 讨论(0)
  • 2021-02-05 09:49

    See this link, need to remove "Microsoft.VisualStudio.QualityTools.UnitTestFramework"

    0 讨论(0)
  • 2021-02-05 09:50

    UWP C# XAML App, MVS2017

    I had a similar issue today, with the following error when building, after installing a new NUGET package (concretely NUGET package Microsoft.Toolkit.Uwp.UI.Controls):

    "cannot resolve assembly or windows metadata file 'type universe cannot resolve assembly: netstandard, version=2.0.0.0, culture=neutral, …"
    

    It turned out to be an incompatibility between NUGET package versions. I found out by fidgetting a bit in NUGET package manager with the package versions. A bit of trial and error, and I found out that by downgrading the version of the newly installed package, and upgrading the version of another package (in this case NewtonSoft.Json), I started building normally without errors or warnings...

    0 讨论(0)
提交回复
热议问题