Browse Source

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 <38400384+Myselfish@users.noreply.github.com>
pull/3694/head
Myself 2 weeks ago committed by GitHub
parent
commit
a2c4dc8aee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj

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

@ -24,7 +24,7 @@
</ItemGroup> </ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> <Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Condition=" '$(OS)' == 'Windows_NT' " Command="powershell -Command &quot;Copy-Item $(ProjectDir)manifest.psd1 $(TargetDir)$(TargetName).psd1&quot;" /> <Exec Condition=" '$(OS)' == 'Windows_NT' " Command="powershell -Command &quot;Copy-Item '$(ProjectDir)manifest.psd1' '$(TargetDir)$(TargetName).psd1'&quot;" />
<Exec Condition=" '$(OS)' != 'Windows_NT' " Command="pwsh -Command &quot;Copy-Item $(ProjectDir)manifest.psd1 $(TargetDir)$(TargetName).psd1&quot;" /> <Exec Condition=" '$(OS)' != 'Windows_NT' " Command="pwsh -Command &quot;Copy-Item '$(ProjectDir)manifest.psd1' '$(TargetDir)$(TargetName).psd1'&quot;" />
</Target> </Target>
</Project> </Project>

Loading…
Cancel
Save