Skip to content

Commit a2c4dc8

Browse files
Fix PowerShell PostBuild failing when solution path contains spaces (#3669)
Quote the $(ProjectDir) and $(TargetDir) MSBuild properties in the Copy-Item commands so that paths with spaces are handled correctly. Co-authored-by: Myselfish <[email protected]>
1 parent 751f109 commit a2c4dc8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</ItemGroup>
2525

2626
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
27-
<Exec Condition=" '$(OS)' == 'Windows_NT' " Command="powershell -Command &quot;Copy-Item $(ProjectDir)manifest.psd1 $(TargetDir)$(TargetName).psd1&quot;" />
28-
<Exec Condition=" '$(OS)' != 'Windows_NT' " Command="pwsh -Command &quot;Copy-Item $(ProjectDir)manifest.psd1 $(TargetDir)$(TargetName).psd1&quot;" />
27+
<Exec Condition=" '$(OS)' == 'Windows_NT' " Command="powershell -Command &quot;Copy-Item '$(ProjectDir)manifest.psd1' '$(TargetDir)$(TargetName).psd1'&quot;" />
28+
<Exec Condition=" '$(OS)' != 'Windows_NT' " Command="pwsh -Command &quot;Copy-Item '$(ProjectDir)manifest.psd1' '$(TargetDir)$(TargetName).psd1'&quot;" />
2929
</Target>
3030
</Project>

0 commit comments

Comments
 (0)