c# - Using Buildconfiguration instead of launchsettings.json for Settings for RemoteDebbuging - Stack Overflow

I have to remote debug on many Machines and currently it is done with an Outputpath in the *.csproj Bui

I have to remote debug on many Machines and currently it is done with an Outputpath in the *.csproj Build to set the Networkdirectory that both Machines can Access, but the Configuration that is used has to be set in the launchSettings.json. So currently I have to set the path manually for building and then select the corresponding Startprofile to connect to the Machine.

Currently, we use the remoteDebugEnabled and the remoteDebugMachine setting in the launchSettings.json but I was hoping to use the same Properties in the Buildconfiguration. But when I comment the settings from the Launchsettings and just put it in the conditional Propertygroup it just does not work.

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Remotedebug PC2|AnyCPU'">
    <DefineConstants>TRACE;_DEV</DefineConstants>
    <OutputPath>\\PC2\RemoteDebugging$\Program2024</OutputPath>
    <RemoteDebugEnabled>true</RemoteDebugEnabled>
    <RemoteDebugMachine>PC2</RemoteDebugMachine>
    <PlatformTarget>x86</PlatformTarget>
</PropertyGroup>

and the launchSettings.json:

"profiles": {
  "Program2024": {
    "commandName": "Project"
    //"PC2": {
    //  "remoteDebugEnabled": true,
    //  "remoteDebugMachine": "PC2"
  }

I tried Rebuilding the Project but it will just simply not start remotely but instead is using a locally compiled *.exe

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745619852a4636454.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信