Target "build" does not exist in the project for Visual Studio

Just had this issue with Visual Studio 2017 v15.9.2 and wiping out the .vs folder in the solution root was the only solution that worked for me.


Deleting the .vs folder worked for me.


The accepted answer is a workaround, not a solution. You need to open the .csproj file for editing in a text editor and ensure the following line is present in there

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

If not add it to the end.

Note: For VS2008, this may be $(MSBuildToolsPath)


I had the same problem when I upgraded a project built in VS2005 to VS2010 Express. Initially the VS2010 refused to load the project with error message "Project is not supported by this installation". After trying many solutions finally it worked and my guess is it worked when two lines were removed from the project file that related to build target. However it presented a new problem that the project would not build. Of course this makes sense as I removed the entries from project file that told Visual Studio how to build the project.

Finally got hold of another project that was working on VS2010 Express and copied following lines to the project that was failing. It worked after that.

 <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
 <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />

Hope this helps someone.