admin管理员组

文章数量:1024582

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

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

本文标签: cUsing Buildconfiguration instead of launchsettingsjson for Settings for RemoteDebbugingStack Overflow