144 lines
7.0 KiB
XML
144 lines
7.0 KiB
XML
<Project>
|
|
|
|
<PropertyGroup>
|
|
<PrepareDependsOn>$(PrepareDependsOn)</PrepareDependsOn>
|
|
<GetArtifactInfoDependsOn>$(GetArtifactInfoDependsOn);GetNativeArtifactsInfo</GetArtifactInfoDependsOn>
|
|
<CompileDependsOn Condition="'$(OS)'=='Windows_NT'">BuildNativeAssets;$(CompileDependsOn)</CompileDependsOn>
|
|
<PackageDependsOn Condition="'$(OS)'=='Windows_NT'">$(PackageDependsOn);PackageNativeProjects;PackageStressTestApp</PackageDependsOn>
|
|
<TestDependsOn>$(TestDependsOn);RunNativeTest</TestDependsOn>
|
|
<NuGetVerifierRuleFile Condition="'$(OS)' != 'Windows_NT'">$(RepositoryRoot)NuGetPackageVerifier.xplat.json</NuGetVerifierRuleFile>
|
|
<SourceBase>$(RepositoryRoot)src\</SourceBase>
|
|
<NativeOutput>bin\$(Configuration)\</NativeOutput>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<Platforms Include="x86" VCPlatform="Win32" />
|
|
<Platforms Include="x64" VCPlatform="x64" />
|
|
</ItemGroup>
|
|
<Import Project="assets.props" />
|
|
|
|
<Target Name="BuildNativeAssets" DependsOnTargets="Prepare;GetToolsets" >
|
|
<PropertyGroup>
|
|
<BuildArgs>-p:Configuration=Native$(Configuration) -v:m -nologo -clp:NoSummary -p:CommitHash=$(CommitHash) -m</BuildArgs>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<ANCMProject Include="$(MSBuildThisFileDirectory)..\IISIntegration.sln $(BuildArgs) -p:Platform=%(Platforms.Identity) -bl:$(LogOutputDir)native.%(Platforms.Identity).binlog"/>
|
|
</ItemGroup>
|
|
|
|
<Error
|
|
Text="Could not find an installation of Visual Studio with the C++ development tools."
|
|
Condition="'$(VisualStudioMSBuildx86Path)' == ''" />
|
|
|
|
<Exec Command=""$(VisualStudioMSBuildx86Path)" %(ANCMProject.Identity)"
|
|
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
|
|
</Target>
|
|
|
|
<Target Name="GetNativeArtifactsInfo">
|
|
<ItemGroup Condition=" '$(OS)' == 'Windows_NT' ">
|
|
<ArtifactInfo Include="$(BuildDir)Microsoft.AspNetCore.AspNetCoreModule.$(PackageVersion).nupkg">
|
|
<ArtifactType>NuGetPackage</ArtifactType>
|
|
<PackageId>Microsoft.AspNetCore.AspNetCoreModule</PackageId>
|
|
<Version>$(PackageVersion)</Version>
|
|
<RepositoryRoot>$(RepositoryRoot)</RepositoryRoot>
|
|
</ArtifactInfo>
|
|
<FilesToExcludeFromSigning Include="$(BuildDir)Microsoft.AspNetCore.AspNetCoreModule.$(PackageVersion).nupkg" />
|
|
|
|
<ArtifactInfo Include="$(BuildDir)Microsoft.AspNetCore.AspNetCoreModuleV2.$(PackageVersion).nupkg">
|
|
<ArtifactType>NuGetPackage</ArtifactType>
|
|
<PackageId>Microsoft.AspNetCore.AspNetCoreModuleV2</PackageId>
|
|
<Version>$(PackageVersion)</Version>
|
|
<RepositoryRoot>$(RepositoryRoot)</RepositoryRoot>
|
|
</ArtifactInfo>
|
|
<FilesToExcludeFromSigning Include="$(BuildDir)Microsoft.AspNetCore.AspNetCoreModuleV2.$(PackageVersion).nupkg" />
|
|
|
|
<ArtifactInfo Include="$(AncmZipOutputPath)">
|
|
<ArtifactType>ZipArchive</ArtifactType>
|
|
<RepositoryRoot>$(RepositoryRoot)</RepositoryRoot>
|
|
<Category>shipoob</Category>
|
|
</ArtifactInfo>
|
|
|
|
<ArtifactInfo Include="$(StressTestWebSiteZipOutputPath)">
|
|
<ArtifactType>ZipArchive</ArtifactType>
|
|
<RepositoryRoot>$(RepositoryRoot)</RepositoryRoot>
|
|
<Category>noship</Category>
|
|
</ArtifactInfo>
|
|
|
|
<FilesToSign Include="$(AncmZipOutputPath)" IsContainer="true" />
|
|
|
|
<FilesToSign Include="@(Components->'%(BaseOutputPath)/%(Platform)/%(NativeAsset).dll')" Container="$(AncmZipOutputPath)" Certificate="$(AssemblySigningCertName)" />
|
|
|
|
<FilesToExcludeFromSigning Include="$(StressTestWebSiteZipOutputPath)" />
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<Target Name="PackageNativeProjects">
|
|
<PropertyGroup>
|
|
<AspNetCoreModuleV2PropsFile>$(MSBuildThisFileDirectory)..\nuget\Microsoft.AspNetCore.AspNetCoreModuleV2.props.in</AspNetCoreModuleV2PropsFile>
|
|
<AspNetCoreModuleV2PropsOutputFile>$(MSBuildThisFileDirectory)..\artifacts\Microsoft.AspNetCore.AspNetCoreModuleV2.props</AspNetCoreModuleV2PropsOutputFile>
|
|
</PropertyGroup>
|
|
|
|
<GenerateFileFromTemplate
|
|
TemplateFile="$(AspNetCoreModuleV2PropsFile)"
|
|
Properties="AspNetCoreModuleOutOfProcessVersion=$(AspNetCoreModuleOutOfProcessVersion)"
|
|
OutputPath="$(AspNetCoreModuleV2PropsOutputFile)" />
|
|
|
|
<PackNuspec NuspecPath="$(MSBuildThisFileDirectory)..\nuget\Microsoft.AspNetCore.AspNetCoreModule.nuspec"
|
|
DestinationFolder="$(BuildDir)"
|
|
Properties="version=$(PackageVersion);Configuration=$(Configuration)"
|
|
Overwrite="true"
|
|
BasePath="$(RepositoryRoot)" />
|
|
|
|
<PackNuspec NuspecPath="$(MSBuildThisFileDirectory)..\nuget\Microsoft.AspNetCore.AspNetCoreModuleV2.nuspec"
|
|
DestinationFolder="$(BuildDir)"
|
|
Properties="version=$(PackageVersion);Configuration=$(Configuration);AspNetCoreModuleOutOfProcessVersion=$(AspNetCoreModuleOutOfProcessVersion);AspNetCoreModuleV2Props=$(AspNetCoreModuleV2PropsOutputFile)"
|
|
Overwrite="true"
|
|
BasePath="$(RepositoryRoot)" />
|
|
|
|
<ItemGroup>
|
|
<AncmFiles Include="%(Components.DllLocation)" Link="%(Components.BaseOutputPath)\%(Components.Platform)\%(Components.NativeAsset).dll" />
|
|
<AncmFiles Include="%(Components.PdbLocation)" Link="%(Components.BaseOutputPath)\%(Components.Platform)\%(Components.NativeAsset).pdb" />
|
|
|
|
<!-- Schema-->
|
|
<AncmFiles Include="$(SourceBase)AspNetCoreModuleV2\AspNetCore\aspnetcore_schema_v2.xml" Link="AspNetCoreModuleV1\aspnetcore_schema.xml" />
|
|
<AncmFiles Include="$(SourceBase)AspNetCoreModuleV2\AspNetCore\aspnetcore_schema_v2.xml" Link="AspNetCoreModuleV2\aspnetcore_schema_v2.xml" />
|
|
<AncmFiles Include="$(SourceBase)AspNetCoreModuleV2\AspNetCore\ancm.mof" Link="AspNetCoreModuleV2\ancm.mof" />
|
|
</ItemGroup>
|
|
|
|
<ZipArchive File="$(AncmZipOutputPath)"
|
|
Overwrite="true"
|
|
SourceFiles="@(AncmFiles)"
|
|
WorkingDirectory="$(RepositoryRoot)" />
|
|
</Target>
|
|
|
|
<Target Name="RunNativeTest" DependsOnTargets="GetToolsets">
|
|
<PropertyGroup>
|
|
<BuildArgs>-p:Configuration=$(Configuration) -v:m -nologo -clp:NoSummary</BuildArgs>
|
|
</PropertyGroup>
|
|
<Exec Command=""$(VisualStudioMSBuildx86Path)" "$(RepositoryRoot)test\CommonLibTests\CommonLibTests.vcxproj" /t:Test $(BuildArgs) -p:Platform=%(Platforms.VCPlatform)"
|
|
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
|
|
</Target>
|
|
|
|
<Target Name="PackageStressTestApp">
|
|
<PropertyGroup>
|
|
<StressAppBasePath>$(MSBuildThisFileDirectory)..\test\WebSites\StressTestWebSite\</StressAppBasePath>
|
|
<StressAppPublishPath>$(StressAppBasePath)bin\published\</StressAppPublishPath>
|
|
</PropertyGroup>
|
|
|
|
<RemoveDir Directories="$(StressAppPublishPath)" />
|
|
<MSBuild
|
|
Projects="$(StressAppBasePath)\StressTestWebSite.csproj"
|
|
Targets="Publish"
|
|
Properties="TargetFramework=netcoreapp2.2;Configuration=$(Configuration);RuntimeIdentifier=win7-%(Platforms.Identity);PublishDir=$(StressAppPublishPath)\%(Identity)" />
|
|
|
|
<ItemGroup>
|
|
<StressAppFiles Include="$(StressAppPublishPath)\**\*" />
|
|
</ItemGroup>
|
|
|
|
<ZipArchive File="$(StressTestWebSiteZipOutputPath)"
|
|
Overwrite="true"
|
|
SourceFiles="@(StressAppFiles)"
|
|
WorkingDirectory="$(StressAppPublishPath)" />
|
|
</Target>
|
|
</Project>
|