Merge pull request #2391 from BlueBlock/add_set_devenvdir_to_prebuild

Update mRemoteNG.csproj
This commit is contained in:
Dimitrij
2023-03-20 21:16:18 +00:00
committed by GitHub

View File

@@ -480,7 +480,7 @@
</None>
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="echo $(ConfigurationName) &gt; buildenv.tmp&#xD;&#xA;&quot;$(DevEnvDir)TextTransform.exe&quot; -a !!BuildConfiguration!&quot;$(Configuration)&quot; &quot;$(ProjectDir)Properties\AssemblyInfo.tt&quot;" />
<Exec Command="echo $(ConfigurationName) &gt; buildenv.tmp&#xD;&#xA;powershell.exe -WindowStyle Hidden -NonInteractive -ExecutionPolicy Bypass -Command &quot;&amp; { $Env:DevEnvDir = ($(SolutionDir)Tools/find_vstool.ps1 devenv.exe); $Env:DevEnvDir = ($Env:DevEnvDir.Replace('devenv.exe','')).replace('`',''); $Env:DevEnvDir }&quot;&#xD;&#xA;&quot;$(DevEnvDir)TextTransform.exe&quot; -a !!BuildConfiguration!&quot;$(Configuration)&quot; &quot;$(ProjectDir)Properties\AssemblyInfo.tt&quot;" />
</Target>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command=":: When passing paths to powershell scripts, check if the path ends with a backslash &quot;\&quot;&#xD;&#xA;:: If it does, then the backslash may be interpreted as an escape character. Add another backslash to cancel the first one.&#xD;&#xA;&#xD;&#xA;powershell -noprofile -command &quot;sleep 2&quot;&#xD;&#xA;&#xD;&#xA;set /p buildenv=&lt;buildenv.tmp&#xD;&#xA;&#xD;&#xA;:: Manual builds, set the cert password and uncomment below.&#xD;&#xA;:: IF &quot;%25APPVEYOR_BUILD_FOLDER&quot;==&quot;&quot; ( set cert_pwd= )&#xD;&#xA;&#xD;&#xA;:: Call the post build powershell script&#xD;&#xA;powershell.exe -ExecutionPolicy Bypass -File &quot;$(SolutionDir)Tools\postbuild_portable.ps1&quot; -SolutionDir &quot;$(SolutionDir)\&quot; -TargetDir &quot;$(TargetDir)\&quot; -TargetFileName &quot;mRemoteNG.exe&quot; -ConfigurationName &quot;%25buildenv%25&quot; -CertificatePath &quot;$(CertPath)&quot; -CertificatePassword &quot;$(CertPassword)&quot; -ExcludeFromSigning &quot;PuTTYNG.exe&quot;" />