116 lines
5.7 KiB
XML
116 lines
5.7 KiB
XML
<!--
|
|
This file is automatically imported by NuGet into a user's project
|
|
when it targets a single framework, or in classic (pre 2017) csproj projects.
|
|
-->
|
|
|
|
<Project>
|
|
|
|
<Target Name="GenerateHostingStartupDeps" BeforeTargets="_GetPackageFiles" >
|
|
|
|
<PropertyGroup>
|
|
<_TemplatesDirectory>$(MSBuildThisFileDirectory)..\content\</_TemplatesDirectory>
|
|
<_DepsOutputDirectory>$(IntermediateOutputPath)\se\</_DepsOutputDirectory>
|
|
<_WorkingDirectory>$(_DepsOutputDirectory)\depswork</_WorkingDirectory>
|
|
<_BasePackagePath>content\additionaldeps\</_BasePackagePath>
|
|
<_RuntimeStoreManifestFile>$(_DepsOutputDirectory)\rs.csproj</_RuntimeStoreManifestFile>
|
|
<_RuntimeStoreOutput>$(_DepsOutputDirectory)\rs\</_RuntimeStoreOutput>
|
|
<_RsRestoreSources>
|
|
$(RestoreAdditionalProjectSources);
|
|
$(ArtifactsShippingPackagesDir);
|
|
$(ArtifactsNonShippingPackagesDir)
|
|
</_RsRestoreSources>
|
|
|
|
<ManifestFileContents>
|
|
<![CDATA[
|
|
<Project Sdk="Microsoft.NET.Sdk">
|
|
<PropertyGroup>
|
|
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
|
<PackageReference Include="%(HostingStartupPackageReference.Identity)" Version="%(HostingStartupPackageReference.Version)" />
|
|
</ItemGroup>
|
|
</Project>
|
|
]]>
|
|
</ManifestFileContents>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup Condition="'@(HostingStartupRuntimeStoreTargets->Count())' == '0'">
|
|
<HostingStartupRuntimeStoreTargets Include="$(DefaultNetCoreTargetFramework)" Runtime="win-x64" />
|
|
<HostingStartupRuntimeStoreTargets Include="$(DefaultNetCoreTargetFramework)" Runtime="win-x86" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<_TemplateFiles Include="$(MSBuildThisFileDirectory)\HostingStartup\*.cs*" />
|
|
<!--
|
|
Always use Major.Minor.0 so that if we have to produce a new SiteExtension during a patch build it will still work for non-patch runtimes.
|
|
i.e. 3.0.0 dotnet will search for 3.0.0 and below and wouldn't find a 3.0.1 folder path
|
|
Side effect, also removes the -ci or -servicing label.
|
|
-->
|
|
<_HostingStartupPackageReference
|
|
Include="%(HostingStartupPackageReference.Identity)"
|
|
Source="%(HostingStartupPackageReference.Source)"
|
|
Version="%(HostingStartupPackageReference.Version)"
|
|
WorkingDirectory="$(_DepsOutputDirectory)%(HostingStartupPackageReference.Identity)"
|
|
Project="$(_DepsOutputDirectory)%(HostingStartupPackageReference.Identity)\HostingStartup.csproj"
|
|
DepsFile="$(_DepsOutputDirectory)%(HostingStartupPackageReference.Identity)\p\HostingStartup.deps.json"
|
|
TrimmedDepsFile="$(_DepsOutputDirectory)%(HostingStartupPackageReference.Identity)\%(HostingStartupPackageReference.Identity).deps.json"
|
|
PackagePath="$(_BasePackagePath)\shared\Microsoft.AspNetCore.App\$(AspNetCoreMajorMinorVersion).0\"
|
|
/>
|
|
</ItemGroup>
|
|
<MakeDir Directories="$(_DepsOutputDirectory)" />
|
|
|
|
<!-- Generate runtime store -->
|
|
<WriteLinesToFile File="$(_RuntimeStoreManifestFile)" Lines="$(ManifestFileContents)" Overwrite="true" Encoding="Unicode"/>
|
|
|
|
<MSBuild Projects="$(_RuntimeStoreManifestFile)"
|
|
Targets="ComposeStore"
|
|
Properties="
|
|
TargetFramework=%(HostingStartupRuntimeStoreTargets.Identity);
|
|
RuntimeFrameworkVersion=$(HostingStartupRuntimeFrameworkVersion);
|
|
RuntimeIdentifier=%(HostingStartupRuntimeStoreTargets.Runtime);
|
|
ComposeDir=$(_RuntimeStoreOutput)\%(HostingStartupRuntimeStoreTargets.Runtime);
|
|
SkipOptimization=true;
|
|
DisablePackageReferenceRestrictions=true;
|
|
RestoreAdditionalProjectSources=$(_RsRestoreSources)" />
|
|
<!-- Generate deps -->
|
|
<RemoveDir Directories="%(_HostingStartupPackageReference.WorkingDirectory)" />
|
|
|
|
<Copy SourceFiles="@(_TemplateFiles)" DestinationFolder="%(_HostingStartupPackageReference.WorkingDirectory)" />
|
|
|
|
<MSBuild Projects="%(_HostingStartupPackageReference.Project)"
|
|
Targets="Restore"
|
|
Properties="
|
|
__DummyTarget=Restore;
|
|
HostingStartupPackageName=%(_HostingStartupPackageReference.Identity);
|
|
HostingStartupPackageVersion=%(_HostingStartupPackageReference.Version);
|
|
RuntimeFrameworkVersion=$(HostingStartupRuntimeFrameworkVersion);
|
|
MicrosoftAspNetCoreAppPackageVersion=$(MicrosoftAspNetCoreAppPackageVersion);
|
|
UseAppHost=false;
|
|
NoBuild=false;
|
|
RestoreAdditionalProjectSources=$(_RsRestoreSources)" />
|
|
|
|
<MSBuild Projects="%(_HostingStartupPackageReference.Project)"
|
|
Targets="Publish"
|
|
Properties="
|
|
PublishDir=%(_HostingStartupPackageReference.WorkingDirectory)\p;
|
|
HostingStartupPackageName=%(_HostingStartupPackageReference.Identity);
|
|
HostingStartupPackageVersion=%(_HostingStartupPackageReference.Version);
|
|
RuntimeFrameworkVersion=$(HostingStartupRuntimeFrameworkVersion);
|
|
MicrosoftAspNetCoreAppPackageVersion=$(MicrosoftAspNetCoreAppPackageVersion);
|
|
UseAppHost=false;
|
|
NoBuild=false;
|
|
IncludeMainProjectInDepsFile=false" />
|
|
<Copy SourceFiles="%(_HostingStartupPackageReference.DepsFile)" DestinationFiles="%(_HostingStartupPackageReference.TrimmedDepsFile)" />
|
|
|
|
<ItemGroup>
|
|
<_RuntimeStoreFiles Include="$(_RuntimeStoreOutput)\%(HostingStartupRuntimeStoreTargets.Runtime)\**\*.dll" />
|
|
|
|
<Content Include="%(_RuntimeStoreFiles.Identity)" PackagePath="content\store\%(RecursiveDir)" />
|
|
<Content Include="%(_HostingStartupPackageReference.TrimmedDepsFile)" PackagePath="%(_HostingStartupPackageReference.PackagePath)" />
|
|
</ItemGroup>
|
|
|
|
</Target>
|
|
|
|
</Project>
|