最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin7PV0评论

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

Post a comment

comment list (0)

  1. No comments so far