Skip to content

Commit 0384f78

Browse files
committed
fix(sdk): escape backslashes in launchSettings.json generation
- Escape backslashes in DevEnvDir path for valid JSON output - Rename launch profile to 'Debug Extension' Closes #25
1 parent 41a0d50 commit 0384f78

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/CodingWithCalvin.VsixSdk/Sdk/Sdk.Vsix.targets

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,13 @@
146146
Condition="'$(BuildingInsideVisualStudio)' == 'true' and '$(DevEnvDir)' != '' and !Exists('$(MSBuildProjectDirectory)\Properties\launchSettings.json')">
147147

148148
<PropertyGroup>
149+
<!-- Escape backslashes for JSON -->
150+
<_DevEnvDirEscaped>$([System.String]::Copy('$(DevEnvDir)').Replace('\','\\'))</_DevEnvDirEscaped>
149151
<_LaunchSettingsContent><![CDATA[{
150152
"profiles": {
151-
"Start Experimental Instance": {
153+
"Debug Extension": {
152154
"commandName": "Executable",
153-
"executablePath": "$(DevEnvDir)devenv.exe",
155+
"executablePath": "$(_DevEnvDirEscaped)devenv.exe",
154156
"commandLineArgs": "/rootSuffix Exp"
155157
}
156158
}

0 commit comments

Comments
 (0)