When I open or create a project in Visual Studio C# 2010 Express I get this error:
Cannot evaluate the property expression "$([MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V120\'))" found at "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0@VCTargetsPath". Invalid static method invocation syntax: "[MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V120\')". Method '[MSBuild]]::ValueOrDefault' not found. Static method invocations should be of the form: §([FullTypeName]::Method()), eg $([System.IO.Path]::Combine(
a
,b
)).
I hope someone can solve this problem. I tried re-installing it but it doesn't work. I think it is something with the registry.
I had the same issue when I had previously installed VS2013 and then uninstalled. This happens because VS2013 uninstaller forgets one of its registry keys, which causes this error when you start to work with VS2010 again.
Delete if there is a key with 12.0 in this location.
HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\MSBuild\\ToolsVersions
Hopefully VS2010 will work again.
Fixed. I removed vs express. That solved the problem.
for me the project had created file which exceeded maximum character length path of OS. problem solved by deleting those file
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.