The universe type cannot allow assembly: System.Configuration And cannot resolve the assembly or Windows metadata file 'System.Configuration.dll

I am developing a UWP application through VS2015 in Win10. My application works fine, but only today, when I launch my application, even I did not make changes to such ... and it shows 2 errors and does not work now.

1. Type universe cannot resolve assembly: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. 2. Cannot resolve Assembly or Windows Metadata file 'System.Configuration.dll' 

What are these errors ... I did not find a satisfactory solution

enter image description here

+14
source share
5 answers

I was able to solve this problem by checking the box "Automatically check for missing packages during build in Visual Studio" ("Allow downloading the right NuGet packages" has already been checked), and then rebuild. These options can be found in "Tools" → "NuGet Package Manager" → "Package Manager Settings".

+6
source

See the link you need to remove "Microsoft.VisualStudio.QualityTools.UnitTestFramework"

+3
source

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

+2
source

UWP application C # XAML, MVS2017

I had a similar problem today with the following build error after installing a new NUGET package (specifically Microsoft.Toolkit.Uwp.UI.Controls NUGET package):

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

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

0
source

I came across this in a somewhat outdated build script. It was an assembly that used one top-level SLN, consisting of several SLN files from numerous projects and projects. I used to just do

call nuget restore "%Top_Level_SLN_File%" -Recursive

and believe that all packages have been restored. Now I have to run

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

This may be due to the fact that some packages use a private feed, but it may be red herring. I did not delve into the problem in order to get minimal playback steps.

0
source

Source: https://habr.com/ru/post/1246149/


All Articles