Using relative path for “Start external program” in VS.NET 2010

后端 未结 7 1125
独厮守ぢ
独厮守ぢ 2020-12-13 04:13

I\'ve seen a few posts related to this topic but none with any conclusive answers...

When debugging my VS.NET 2010 app, I\'m trying to start an external program whos

7条回答
  •  半阙折子戏
    2020-12-13 04:16

    I know this is a little late to the party, but here's how we do it. The key to this is to set the 'OutputPath' explicitly to the Build directory. This re-bases it to working directory and not the VS install directory.

    1. Update output path for the project to be:
      $(MSBuildProjectDirectory)\bin\

    2. Update StartProgram for the project to be:
      $(OutputPath)Relative.exe

    Here is a sample configuration PropertyGroup:

    
       
       AnyCPU
       true
       full
       DEBUG;TRACE
       prompt
    
       
       $(MSBuildProjectDirectory)\bin\
       Program
       $(OutputPath)NServiceBus.Host.exe
       NServiceBus.Integration
    
    

提交回复
热议问题