Error update to .NET 4.5

I am trying to migrate from VS2010.NET 4 to VS2012.NET 4.5, and I get the following error in every project that I installed .NET 4.5 when they try to build.

The expression "[Microsoft.Build.Utilities.ToolLocationHelper] :: GetPathToStandardLibraries (.NETFramework,?, '', '')" Cannot be evaluated. Part of the version string is too short or too long.

I cannot find references to this in my code, and the msdn link for this function does not contain any hints ( http://msdn.microsoft.com/en-us/library/hh135279.aspx ).

Has anyone seen this before or knew a solution?

Edit

The solution listed here does not seem to work. http://social.msdn.microsoft.com/Forums/da-DK/vseditor/thread/8ca4a9b0-742d-487d-ab8c-6c3a80cffd40

+4
source share
3 answers

Somehow, after several attempts, including restarting the machine and visual studio, it started to work for no apparent reason.

+2
source

Upload your project and remove the tag below from your .csproj file:

<TargetFrameworkVersion></TargetFrameworkVersion> 

and reload your project again, it works for me.

+1
source

I had the same problem when upgrading from 4.6.1 to 4.7.2 of the framework. I had a great solution with many projects. This error was discovered when building the last project (win application), which had the correct <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> .

The cause of the problem was other projects used by the win app project. They had the wrong version of the framework.

+1
source

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


All Articles