run a custom msbuild target from VisualStudio

后端 未结 4 1017
清歌不尽
清歌不尽 2020-12-13 09:34

Suppose I add a custom target to a csproj file. Is there a way to run that target from visual studio? I don\'t want it make it a prebuild or postbuild step, I just want to

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-13 10:22

    If you are running the build inside of Visual Studio there will be a build variable of VisualStudioDir during the build.

    To execute only is a VS build session do this:

    
    
提交回复
热议问题