|
1 | | -<Project> |
| 1 | +<Project> |
2 | 2 | <!-- Implicit SDK props import --> |
3 | 3 | <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> |
4 | 4 |
|
5 | 5 | <PropertyGroup> |
6 | 6 | <TargetFramework>net472</TargetFramework> |
7 | 7 | <GenerateAssemblyInfo>false</GenerateAssemblyInfo> |
8 | 8 | <EnableDefaultItems>false</EnableDefaultItems> |
9 | | - <PayloadPath>$(PlatformOutPath)Installer.Windows\bin\$(Configuration)\net472\win-x86</PayloadPath> |
| 9 | + <PayloadPath>$(PlatformOutPath)Installer.Windows\bin\$(Configuration)\net472\$(RuntimeIdentifier)</PayloadPath> |
10 | 10 | <InnoSetupVersion>6.3.1</InnoSetupVersion> |
11 | 11 | </PropertyGroup> |
12 | 12 |
|
|
27 | 27 |
|
28 | 28 | <Target Name="CoreCompile" Condition="'$(OSPlatform)'=='windows'"> |
29 | 29 | <PropertyGroup> |
30 | | - <InnoSetupCommandSystem>"$(NuGetPackageRoot)Tools.InnoSetup\$(InnoSetupVersion)\tools\ISCC.exe" /DPayloadDir="$(PayloadPath)" /DInstallTarget=system "$(RepoSrcPath)\windows\Installer.Windows\Setup.iss" /O"$(OutputPath)"</InnoSetupCommandSystem> |
31 | | - <InnoSetupCommandUser>"$(NuGetPackageRoot)Tools.InnoSetup\$(InnoSetupVersion)\tools\ISCC.exe" /DPayloadDir="$(PayloadPath)" /DInstallTarget=user "$(RepoSrcPath)\windows\Installer.Windows\Setup.iss" /O"$(OutputPath)"</InnoSetupCommandUser> |
| 30 | + <InnoSetupCommandSystem>"$(NuGetPackageRoot)Tools.InnoSetup\$(InnoSetupVersion)\tools\ISCC.exe" /DPayloadDir="$(PayloadPath)" /DInstallTarget=system /DGcmRuntimeIdentifier="$(RuntimeIdentifier)" "$(RepoSrcPath)\windows\Installer.Windows\Setup.iss" /O"$(OutputPath)"</InnoSetupCommandSystem> |
| 31 | + <InnoSetupCommandUser>"$(NuGetPackageRoot)Tools.InnoSetup\$(InnoSetupVersion)\tools\ISCC.exe" /DPayloadDir="$(PayloadPath)" /DInstallTarget=user /DGcmRuntimeIdentifier="$(RuntimeIdentifier)" "$(RepoSrcPath)\windows\Installer.Windows\Setup.iss" /O"$(OutputPath)"</InnoSetupCommandUser> |
32 | 32 | </PropertyGroup> |
33 | 33 |
|
34 | 34 | <Message Text="Lay Out" Importance="High" /> |
35 | | - <Exec Condition="'$(NoLayout)'!='true'" Command="powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -Command "& {&'$(MSBuildProjectDirectory)\layout.ps1' -Configuration '$(Configuration)' -Output '$(PayloadPath)'}"" /> |
| 35 | + <Exec Condition="'$(NoLayout)'!='true'" |
| 36 | + ConsoleToMSBuild="true" |
| 37 | + Command="powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -Command "& {&'$(MSBuildProjectDirectory)\layout.ps1' -Configuration '$(Configuration)' -Output '$(PayloadPath)' -RuntimeIdentifier '$(RuntimeIdentifier)'; if ($?) { exit 0 } else { exit 1 }}"" |
| 38 | + IgnoreExitCode="true"> |
| 39 | + <!-- If we want to display the console output if the exit code is not 0, we need to capture it and then output it using the <Error /> below --> |
| 40 | + <Output TaskParameter="ExitCode" PropertyName="ExitCodeOfExec" /> |
| 41 | + <Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" /> |
| 42 | + </Exec> |
| 43 | + <Error Condition="'$(NoLayout)'!='true' AND '$(ExitCodeOfExec)' != '0'" Text="Layout script failed with exit code $(ExitCodeOfExec) and message $(OutputOfExec)" /> |
36 | 44 | <Message Text="$(InnoSetupCommandSystem)" Importance="High" /> |
37 | 45 | <Exec Command="$(InnoSetupCommandSystem)" /> |
38 | 46 | <Message Text="$(InnoSetupCommandUser)" Importance="High" /> |
|
0 commit comments