Target “build” does not exist in the project for Visual Studio

后端 未结 6 1048
天命终不由人
天命终不由人 2020-12-15 16:07

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 an

6条回答
  •  太阳男子
    2020-12-15 16:31

    As for me, I was trying to build a solution with F# projects (.fsproj files).

    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 run the new version, located in "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe", everything started working fine.

    Or in case you're using Visual Studio Enterprise, or GithubActions CI, then the path is "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe".

    I found them by running this:

    "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -find MSBuild\**\Bin\MSBuild.exe
    

提交回复
热议问题