Fix post_build.ps1 script failing due to PS ExecutionPolicy

This commit is contained in:
Jeremy Wu 2019-08-01 23:27:21 +10:00
parent 4231d7b50a
commit 010218b5ce

View File

@ -462,7 +462,7 @@
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>powershell.exe -NoProfile -File $(SolutionDir)Scripts\post_build.ps1 $(ConfigurationName) $(SolutionDir)</PostBuildEvent> <PostBuildEvent>powershell -command "$policy = Get-ExecutionPolicy"; "Set-ExecutionPolicy RemoteSigned"; "'-NoProfile -File $(SolutionDir)Scripts\post_build.ps1 $(ConfigurationName) $(SolutionDir)'"; "Set-ExecutionPolicy $policy"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<PreBuildEvent>taskkill /f /fi "IMAGENAME eq Wox.exe"</PreBuildEvent> <PreBuildEvent>taskkill /f /fi "IMAGENAME eq Wox.exe"</PreBuildEvent>