Visual Studio 2015: Failed to resolve mscorlib on target structure

I am trying to update a service link but I am getting the following error:

Failed to resolve mscorlib for target environment ".NETFramework, Version = v4.0". This can happen if the target structure is not set or if the structure is not formatted correctly.

  • .NET v4.0 installed.
  • Both "Update Service Link" and "Configure Service Link" give the same error.
+4


source to share


3 answers


This can happen if you have a wrong help desk configuration

try the following



  • open the csproj file in any text editor
  • then remove all links to any soap service or its files.
  • save and open the project in visual studio
0


source


In my project, nuget packages were not restoring correctly due to some connection issues. Once the nuget packages were successfully restored the error went away.



0


source


i opened the project file in notepad editor and deleted that.

Target name = "EnsureNuGetPackageBuildImports" /> blah blah blah

0


source







All Articles