visual-studiomsbuildvisual-studio-2019msbuild-taskmsbuildcommunitytasks

how to add stop msbuild from building the project visual studio build option


I want to stop msbuild default "build" target to stop building my code instead, i want to define my custom target which will build my application. how to achieve this?

Thanks,


Solution

  • Just open the csproj file of your project.

    And add these at the bottom of the file:

    <Target Name="Build">
    
    //write your custom build function
    
    </Target>
    

    It will overwrite the default build and use yours.