Error: The target "Build" does not exist in the project
See original GitHub issueOn MacOS the initial build.sh
fails with this:
/usr/local/Cellar/mono/6.0.0.319/lib/mono/msbuild/15.0/bin/MSBuild.dll /bl:/var/folders/r1/xm_0s3y11td6zwk4mx8nplrw0000gn/T/tmpixxlW5.tmp.binlog /p:RestorePackages=False /p:Optimize=True /p:DebugSymbols=True /p:Configuration=Release /t:Build /v:q MyProject.sln
/Users/alex/Projects/MyProject/src/MyProject/MyProject.fsproj : error MSB4057: The target "Build" does not exist in the project.
/Users/alex/Projects/MyProject/src/MyProject/MyProject.fsproj : error MSB4057: The target "Build" does not exist in the project.
/Users/alex/Projects/MyProject/src/MyProject/MyProject.fsproj : error MSB4057: The target "Build" does not exist in the project.
/Users/alex/Projects/MyProject/src/MyProjectConsole/MyProjectConsole.fsproj : error MSB4057: The target "Build" does not exist in the project.
/Users/alex/Projects/MyProject/src/MyProjectConsole/MyProjectConsole.fsproj : error MSB4057: The target "Build" does not exist in the project.
: /Users/alex/Projects/MyProject/src/MyProject/MyProject.fsproj(0,0): error MSB4057: The target "Build" does not exist in the project.
: /Users/alex/Projects/MyProject/src/MyProjectConsole/MyProjectConsole.fsproj(0,0): error MSB4057: The target "Build" does not exist in the project.
Finished (Failed) 'MSBuild' in 00:00:02.1028417
Finished (Failed) 'Build' in 00:00:02.1050855
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Target "build" does not exist in the project for Visual Studio
The problem was that I was using an old MSBuild (located in path %WINDIR%\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe ). When I tried to ...
Read more >The target "Build" does not exist in the project. (MSB4057)
I notice this error in any VB.NET project that I try to compile (VS for Mac 7.2.2 build 11). A work around was...
Read more >MSB4057: The target 'target name' does not exist ...
This error occurs when a target cannot be found, but it is referenced in a project file (such as in CallTarget , BeforeTargets...
Read more >The target "Build" does not exist in the project - YouTube
c#: Visual Studio MacOS error MSB4057: The target " Build " does not exist in the project Thanks for taking the time to...
Read more >The target “Build” does not exist in the project for Sitecore TDS ...
We need to update the scproj file – basically the TDS Project file – but Long story short – make sure that the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To found the issue, you can created your own Build-target to the fsproj-file first:
The issue is probably that there is a condition saying something like
but with recent Visual Studio the condition is not met or the path is actually somewhere else, like in
VisualStudio\v$(MSBuildToolsVersion)\FSharp\
and not inVisualStudio\v$(VisualStudioVersion)\FSharp\
so as a quick fix you can fallback it to something else likeLooks like there hasn’t been any accepted pull requests in a while, so let’s ask about in the f# projects channel.