Include AppHostTemplate
This commit is contained in:
parent
55841f78ea
commit
6c8f08bbd9
2 changed files with 68 additions and 3 deletions
|
@ -19,18 +19,18 @@
|
||||||
|
|
||||||
<!-- Download the runtime package with the crossgen executable in it -->
|
<!-- Download the runtime package with the crossgen executable in it -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DownloadPackageProject Include="$(MSBuildThisFileDirectory)DownloadPackage.csproj">
|
<CrossGenDownloadPackageProject Include="$(MSBuildThisFileDirectory)DownloadPackage.csproj">
|
||||||
<Properties>
|
<Properties>
|
||||||
PackageToRestore=$(RuntimeNETCoreAppPackageName);
|
PackageToRestore=$(RuntimeNETCoreAppPackageName);
|
||||||
PackageVersionToRestore=$(MicrosoftNETCoreAppPackageVersion);
|
PackageVersionToRestore=$(MicrosoftNETCoreAppPackageVersion);
|
||||||
TargetFramework=$(TargetFramework)
|
TargetFramework=$(TargetFramework)
|
||||||
</Properties>
|
</Properties>
|
||||||
</DownloadPackageProject>
|
</CrossGenDownloadPackageProject>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<MSBuild
|
<MSBuild
|
||||||
BuildInParallel="False"
|
BuildInParallel="False"
|
||||||
Projects="@(DownloadPackageProject)">
|
Projects="@(CrossGenDownloadPackageProject)">
|
||||||
</MSBuild>
|
</MSBuild>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -218,6 +218,70 @@
|
||||||
Overwrite="true" />
|
Overwrite="true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="LayoutAppHostTemplate" DependsOnTargets="RunResolvePackageDependencies">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<NETCoreDotNetAppHostPackageName>Microsoft.NETCore.DotNetAppHost</NETCoreDotNetAppHostPackageName>
|
||||||
|
<AppHostRestorePath>$(IntermediateOutputPath)AppHostRestore\</AppHostRestorePath>
|
||||||
|
<AppHostTemplatePath>$(SdkOutputDirectory)AppHostTemplate</AppHostTemplatePath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<RemoveDir Directories="$(AppHostRestorePath)" />
|
||||||
|
<MakeDir Directories="$(AppHostRestorePath)" />
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<NETCoreDotNetAppHostPackageVersions Include="@(PackageDefinitions->'%(Version)')"
|
||||||
|
Condition="%(PackageDefinitions.Name) == $(NETCoreDotNetAppHostPackageName)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Error Condition="@(NETCoreDotNetAppHostPackageVersions->Distinct()->Count()) != 1"
|
||||||
|
Text="Failed to determine the $(NETCoreDotNetAppHostPackageName) version pulled in Microsoft.NETCore.App" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<_NETCoreDotNetAppHostPackageVersion>@(NETCoreDotNetAppHostPackageVersions->Distinct())</_NETCoreDotNetAppHostPackageVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<AppHostTemplateDownloadPackageProject Include="$(MSBuildThisFileDirectory)DownloadPackage.csproj">
|
||||||
|
<Properties>
|
||||||
|
PackageToRestore=$(NETCoreDotNetAppHostPackageName);
|
||||||
|
PackageVersionToRestore=$(_NETCoreDotNetAppHostPackageVersion);
|
||||||
|
TargetFramework=$(TargetFramework);
|
||||||
|
RestorePackagesPath=$(AppHostRestorePath);
|
||||||
|
RuntimeIdentifier=$(Rid)
|
||||||
|
</Properties>
|
||||||
|
</AppHostTemplateDownloadPackageProject>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<MSBuild
|
||||||
|
BuildInParallel="False"
|
||||||
|
Projects="@(AppHostTemplateDownloadPackageProject)">
|
||||||
|
</MSBuild>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<AppHostExecutableName>AppHost$(ExeExtension)</AppHostExecutableName>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<AllFileOfRestoredAppHostPackage Include="$(AppHostRestorePath)\**\*.*" />
|
||||||
|
<NativeRestoredAppHostNETCore
|
||||||
|
Include="@(AllFileOfRestoredAppHostPackage)"
|
||||||
|
Condition="'%(FileName)%(Extension)' == '$(AppHostExecutableName)'"/>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Error Condition="@(NativeRestoredAppHostNETCore->Distinct()->Count()) != 1"
|
||||||
|
Text="Failed to determine the $(NETCoreDotNetAppHostPackageName) executable in @(AllFileOfRestoredAppHostPackage)" />
|
||||||
|
|
||||||
|
<Copy
|
||||||
|
SourceFiles="@(NativeRestoredAppHostNETCore)"
|
||||||
|
DestinationFolder="$(AppHostTemplatePath)" />
|
||||||
|
|
||||||
|
<Message Text="Copy from @(NativeRestoredAppHostNETCore) to $(AppHostTemplatePath)."
|
||||||
|
Importance="High" />
|
||||||
|
|
||||||
|
</Target>
|
||||||
|
|
||||||
<Target Name="GenerateLayout"
|
<Target Name="GenerateLayout"
|
||||||
DependsOnTargets="DownloadBundledComponents;
|
DependsOnTargets="DownloadBundledComponents;
|
||||||
CleanLayoutPath;
|
CleanLayoutPath;
|
||||||
|
@ -227,6 +291,7 @@
|
||||||
LayoutTemplates;
|
LayoutTemplates;
|
||||||
LayoutBundledTools;
|
LayoutBundledTools;
|
||||||
RetargetTools;
|
RetargetTools;
|
||||||
|
LayoutAppHostTemplate;
|
||||||
CrossgenLayout"
|
CrossgenLayout"
|
||||||
AfterTargets="Build">
|
AfterTargets="Build">
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue