When attempting to build in visual studio 2015, the following file is missing? This project was previously being built in VS2013.
Severity Code De
In my case, I removed "ls.pubignore.wpp.targets" file from root. and It removed the error. :)
For Visual Studio 2017 this is what worked for me, it's a mix of two provided solutions. Neither worked on their own so this is why I'm submitting this as a new answer.
In the file C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\CodeAnalysis\Microsoft.CodeAnalysis.Targets
Replace AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">
with AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
And then copy the file C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Build.Tasks.Core.dll
in the same folder with the name Microsoft.Build.Tasks.v15.0.dll
My solution: removing two rows from the "*.csproj" file:
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
I had the same issue, in my case I updated some of the packages from NuGet package manager in VS2015, then tried to open the same solution in vs2013 in another machine where vs2015 was not installed.
Installing Microsoft Build Tools 2015 has resolved the error. That adds Microsoft.Build.Utilities.Core.dll to the GAC, which I think is what makes it work.
https://www.microsoft.com/en-in/download/details.aspx?id=48159
It was enough for me to just restart Visual Studio.
I suspect that I had earlier killed all my MSBuild.exe processes doing something else and that not having any MSBuild.exe processes causes the error.