Cannot resolve Assembly or Windows Metadata file 'System.Configuration.dll'

Viewed 12171

I am trying to compile a small test build (written in C#) in Visual Studio. However, I get two errors when trying so and can't find the issue. No line's are given:

Error 1: small_project.csproj

Cannot resolve Assembly or Windows Metadata file 'System.Configuration.dll'

Error 2:

Type universe cannot resolve assembly: System.Configuration, Version 2.0.0.0, Culture=neutral, PublicKeyToken.. etc..

I am new at developing with C# and XAML. Does someone know what could cause these errors?

3 Answers

In my case the problem was that my UWP project referenced a project that referenced System.Web.Application.dll. I did:

  • Delete reference from the parent project
  • Clean and build parent project
  • Update Service Reference in child project
  • Clean and build child project
  • Remove unused reference from child project (System.Web.dll)

I learnt it's better to use nuget packages instead of adding references manually.

System.Web.ApplicationServices-Error

Related