最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin7浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论