Fix site extension ANCM layout (#6088)

This commit is contained in:
Pavel Krymets 2018-12-21 16:46:51 -08:00 committed by GitHub
parent 4eb495c74f
commit 85f1f3d893
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 43 deletions

View File

@ -10,45 +10,28 @@ with the right MSBuild incantations to get output copied to the right place.
<When Condition="'$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' "> <When Condition="'$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' ">
<ItemGroup Condition=" '@(Reference->AnyHaveMetadataValue('Identity', 'AspNetCoreModule'))' == 'true' "> <ItemGroup Condition=" '@(Reference->AnyHaveMetadataValue('Identity', 'AspNetCoreModule'))' == 'true' ">
<Reference Remove="AspNetCoreModule" /> <Reference Remove="AspNetCoreModule" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV1\AspNetCore\AspNetCore.vcxproj" /> <NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV1\AspNetCore\AspNetCore.vcxproj" Platform="x64" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV1\AspNetCore\AspNetCore.vcxproj" Platform="x86" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '@(Reference->AnyHaveMetadataValue('Identity', 'AspNetCoreModuleV2'))' == 'true' "> <ItemGroup Condition=" '@(Reference->AnyHaveMetadataValue('Identity', 'AspNetCoreModuleV2'))' == 'true' ">
<Reference Remove="AspNetCoreModuleV2" /> <Reference Remove="AspNetCoreModuleV2" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" /> <NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="x64" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" HandlerPath="2.0.0" /> <NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" Platform="x64" HandlerPath="2.0.0" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" /> <NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" Platform="x64" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="x86" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" Platform="x86" HandlerPath="2.0.0" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" Platform="x86" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="@(NativeProjectReference->Count()) != 0 AND '$(BuildNative)' != 'false' "> <ItemGroup Condition="@(NativeProjectReference->Count()) != 0 AND '$(BuildNative)' != 'false' ">
<!-- TODO: investigate building just one arch at a time. --> <!-- TODO: investigate building just one arch at a time. -->
<ProjectReference Include="@(NativeProjectReference)"> <ProjectReference Include="@(NativeProjectReference)">
<!-- Set the arch--> <!-- Set the arch-->
<SetPlatform>Platform=x64</SetPlatform> <SetPlatform>Platform=%(Platform)</SetPlatform>
<!-- The base path for the output. --> <!-- The base path for the output. -->
<LinkBase>x64\%(HandlerPath)\</LinkBase> <LinkBase>%(Platform)\%(HandlerPath)\</LinkBase>
<!-- This reference assembly doesn't need -->
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<!-- NativeContent is a custom type of item group which is assigned a target path after project references are resolved. -->
<OutputItemType>NativeContent</OutputItemType>
<!-- Set the copy policy. -->
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<!-- This instructs the ProjectRef protocol to collect symbols as well as built output -->
<Targets>Build;BuiltProjectOutputGroup;DebugSymbolsProjectOutputGroup</Targets>
<!-- Optimization. Native projects don't have a .NET TargetFramework -->
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
<UndefineProperties>TargetFramework</UndefineProperties>
<!-- Don't put this reference into generated .nuspec -->
<PrivateAssets>All</PrivateAssets>
<!-- Publish assets from this reference -->
<Publish>true</Publish>
</ProjectReference>
<ProjectReference Include="@(NativeProjectReference)">
<!-- Set the arch-->
<SetPlatform>Platform=x86</SetPlatform>
<!-- The base path for the output. -->
<LinkBase>x86\%(HandlerPath)\</LinkBase>
<!-- This reference assembly doesn't need --> <!-- This reference assembly doesn't need -->
<ReferenceOutputAssembly>false</ReferenceOutputAssembly> <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<!-- NativeContent is a custom type of item group which is assigned a target path after project references are resolved. --> <!-- NativeContent is a custom type of item group which is assigned a target path after project references are resolved. -->

View File

@ -25,7 +25,8 @@
</Target> </Target>
<ItemGroup Condition="'$(OS)' == 'Windows_NT' AND '$(VCTargetsPath)' != ''"> <ItemGroup Condition="'$(OS)' == 'Windows_NT' AND '$(VCTargetsPath)' != ''">
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" /> <NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" Platform="x86" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" Platform="x64" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -27,9 +27,13 @@
</Target> </Target>
<ItemGroup Condition="'$(OS)' == 'Windows_NT' AND '$(VCTargetsPath)' != ''"> <ItemGroup Condition="'$(OS)' == 'Windows_NT' AND '$(VCTargetsPath)' != ''">
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV1\AspNetCore\AspNetCore.vcxproj" /> <NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV1\AspNetCore\AspNetCore.vcxproj" Platform="x86" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" /> <NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="x86" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" HandlerPath="2.0.0" /> <NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" HandlerPath="2.0.0" Platform="x86"/>
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV1\AspNetCore\AspNetCore.vcxproj" Platform="x64" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="x64" />
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" HandlerPath="2.0.0" Platform="x64"/>
</ItemGroup> </ItemGroup>
<Target Name="AddRunNativeComponents" BeforeTargets="AssignTargetPaths" Condition="'$(OS)' == 'Windows_NT'"> <Target Name="AddRunNativeComponents" BeforeTargets="AssignTargetPaths" Condition="'$(OS)' == 'Windows_NT'">

View File

@ -32,6 +32,8 @@
<Import Project="$(RepositoryRoot)build\tasks\RepoTasks.tasks" /> <Import Project="$(RepositoryRoot)build\tasks\RepoTasks.tasks" />
<Import Project="$(RepositoryRoot)src\Servers\IIS\ResolveIisReferences.targets" />
<Target Name="CopyFilesToOutputDirectory" /> <Target Name="CopyFilesToOutputDirectory" />
<Target Name="CoreCompile" /> <Target Name="CoreCompile" />
<Target Name="CreateManifestResourceNames" /> <Target Name="CreateManifestResourceNames" />

View File

@ -22,26 +22,20 @@
<Content Include="$(RepositoryRoot)bin\Microsoft.Web.Xdt.Extensions\$(Configuration)\net461\Microsoft.Web.Xdt.Extensions.dll" PackagePath="content" /> <Content Include="$(RepositoryRoot)bin\Microsoft.Web.Xdt.Extensions\$(Configuration)\net461\Microsoft.Web.Xdt.Extensions.dll" PackagePath="content" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(SharedFxArchitecture)' == 'x86'">
<Content Include="$(AspNetCoreModuleX86Location)" PackagePath="content\ancm" />
<Content Include="$(OutOfProcessRequestHandlerX86Location)" PackagePath="content\ancm\$(AspNetCoreModuleOutOfProcessVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(SharedFxArchitecture)' == 'x64'">
<Content Include="$(AspNetCoreModuleX64Location)" PackagePath="content\ancm" />
<Content Include="$(OutOfProcessRequestHandlerX64Location)" PackagePath="content\ancm\$(AspNetCoreModuleOutOfProcessVersion)" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Microsoft.Web.Xdt.Extensions\src\Microsoft.Web.Xdt.Extensions.csproj" PrivateAssets="All" ReferenceOutputAssembly="False"/> <ProjectReference Include="..\Microsoft.Web.Xdt.Extensions\src\Microsoft.Web.Xdt.Extensions.csproj" PrivateAssets="All" ReferenceOutputAssembly="False"/>
<!-- Make sure redist folder is built and ready --> <!-- Make sure redist folder is built and ready -->
<ProjectReference Include="..\..\Installers\Archive\Archive.Redist.zipproj" PrivateAssets="All" ReferenceOutputAssembly="False" /> <ProjectReference Include="..\..\Installers\Archive\Archive.Redist.zipproj" PrivateAssets="All" ReferenceOutputAssembly="False" />
<PackageReference Include="Microsoft.AspNetCore.AspNetCoreModuleV2" Version="$(PackageVersion)" />
<NativeProjectReference Include="$(RepositoryRoot)src\Servers\IIS\src\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="$(SharedFxArchitecture)" />
<NativeProjectReference Include="$(RepositoryRoot)src\Servers\IIS\src\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" HandlerPath="2.0.0" Platform="$(SharedFxArchitecture)" />
</ItemGroup> </ItemGroup>
<Target Name="ResolveReferenceItemsForPackage" DependsOnTargets="ResolveReferences" BeforeTargets="_GetPackageFiles"> <Target Name="ResolveReferenceItemsForPackage" DependsOnTargets="ResolveReferences" BeforeTargets="_GetPackageFiles">
<ItemGroup> <ItemGroup>
<Content Include="$(DotNetUnpackFolder)\**\*.*" Condition="$(DotNetAssetRootUrl) != ''" PackagePath="content\%(RecursiveDir)" /> <Content Include="$(DotNetUnpackFolder)\**\*.*" Condition="$(DotNetAssetRootUrl) != ''" PackagePath="content\%(RecursiveDir)" />
<Content Include="%(NativeContent.Identity)" PackagePath="content\ancm\%(NativeContent.HandlerPath)" />
</ItemGroup> </ItemGroup>
</Target> </Target>