I'm checking out code for a project where contributors use different dev tools for coding in c sharp (C#). My .csproj file was manipulated by someone using Sharp develop and now I get 'The target "build" does not exist in the project'.
- How can I correct this?
I am using Visual Studio 2008 SP 1.
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.
Hope this helps someone.
If you were to do it manually, I would take all the files and add them back to a new project file one by one.
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 thereIf not add it to the end.
Note: For VS2008, this may be
$(MSBuildToolsPath)