|
1 | | -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> |
2 | | - |
3 | | - <Target Name="CheckBootstrapperPrerequisites" BeforeTargets="CreateBootstrapperAfterBuild;CreateBootstrapperAfterPublish"> |
4 | | - <!-- Warning: not .NET Core --> |
5 | | - <Warning |
6 | | - Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" |
7 | | - Code="DRB_NOT_NETCORE" |
8 | | - Text="Project is not targeting .NET Core. Bootstrapper will not be created." /> |
9 | | - |
10 | | - <!-- Warning: not Windows target platform --> |
11 | | - <Warning |
12 | | - Condition="!$([MSBuild]::IsOsPlatform('Windows'))" |
13 | | - Code="DRB_NOT_WINDOWS" |
14 | | - Text="Target platform is not Windows. Boostrapper will not be created." /> |
15 | | - </Target> |
| 1 | +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" TreatAsLocalProperty="IsNetCoreApp;IsWindowsTarget;CanGenerateBootstrapper"> |
16 | 2 |
|
| 3 | + <!-- Bootstrapper on build --> |
17 | 4 | <Target |
18 | | - Condition="$(GenerateBootstrapperOnBuild) AND '$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND $([MSBuild]::IsOsPlatform('Windows'))" |
| 5 | + Condition="$(GenerateBootstrapperOnBuild)" |
19 | 6 | Name="CreateBootstrapperAfterBuild" |
20 | 7 | AfterTargets="Build"> |
21 | 8 | <PropertyGroup> |
|
26 | 13 | </PropertyGroup> |
27 | 14 |
|
28 | 15 | <BootstrapperTask |
| 16 | + RuntimeIdentifier="$(RuntimeIdentifier)" |
29 | 17 | Variant="$(BootstrapperVariant)" |
30 | 18 | IsPromptRequired="$(BootstrapperPromptRequired)" |
31 | 19 | TargetFilePath="$(TargetPath)" /> |
32 | 20 | </Target> |
33 | 21 |
|
| 22 | + <!-- Bootstrapper on publish --> |
34 | 23 | <Target |
35 | | - Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND $([MSBuild]::IsOsPlatform('Windows'))" |
36 | 24 | Name="CreateBootstrapperAfterPublish" |
37 | 25 | AfterTargets="Publish"> |
38 | 26 | <PropertyGroup> |
|
43 | 31 | </PropertyGroup> |
44 | 32 |
|
45 | 33 | <BootstrapperTask |
| 34 | + RuntimeIdentifier="$(RuntimeIdentifier)" |
46 | 35 | Variant="$(BootstrapperVariant)" |
47 | 36 | IsPromptRequired="$(BootstrapperPromptRequired)" |
48 | 37 | TargetFilePath="$([System.IO.Path]::Combine('$(ProjectDir)', '$(PublishDir)/$(AssemblyName).dll'))" /> |
|
0 commit comments