93 lines
5.5 KiB
XML
93 lines
5.5 KiB
XML
<Project>
|
|
|
|
<PropertyGroup>
|
|
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
|
|
<Platforms>x64;x86</Platforms>
|
|
<IISExpressAppHostConfig>$(MSBuildThisFileDirectory)applicationhost.config</IISExpressAppHostConfig>
|
|
<IISAppHostConfig>$(MSBuildThisFileDirectory)applicationhost.iis.config</IISAppHostConfig>
|
|
<NativePlatform Condition="'$(Platform)' == 'AnyCPU'">x64</NativePlatform>
|
|
<NativePlatform Condition="'$(NativePlatform)' == ''">$(Platform)</NativePlatform>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(NativePlatform)' == 'x86'">
|
|
<IISExpressPath>$(MSBuildProgramFiles32)\IIS Express\iisexpress.exe</IISExpressPath>
|
|
<IISPath>$(SystemRoot)\SysWOW64\inetsrv\w3wp.exe</IISPath>
|
|
<NativeFolder>Win32</NativeFolder>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(NativePlatform)' == 'x64'">
|
|
<IISExpressPath>$(ProgramW6432)\IIS Express\iisexpress.exe</IISExpressPath>
|
|
<IISPath>$(SystemRoot)\System32\inetsrv\w3wp.exe</IISPath>
|
|
<NativeFolder>x64</NativeFolder>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<!-- For standalone publish, all dlls are flattened to the same folder.
|
|
Set the base path to the request handler
|
|
-->
|
|
<BasePathForRequestHandler Condition="'$(RuntimeIdentifier)' == ''">$(NativePlatform)\</BasePathForRequestHandler>
|
|
|
|
</PropertyGroup>
|
|
<ItemGroup Condition="'$(OS)' == 'Windows_NT' AND ('$(ANCMVersion)' == 'V2' Or '$(ANCMVersion)' == '')">
|
|
<None Include="$(MSBuildThisFileDirectory)..\src\AspNetCoreModuleV2\RequestHandler\bin\$(Configuration)\$(NativeFolder)\aspnetcorerh.dll" CopyToOutputDirectory="PreserveNewest" Visible="true" Link="$(BasePathForRequestHandler)%(FileName)%(Extension)" />
|
|
<None Include="$(MSBuildThisFileDirectory)..\src\AspNetCoreModuleV2\RequestHandler\bin\$(Configuration)\$(NativeFolder)\aspnetcorerh.pdb" CopyToOutputDirectory="PreserveNewest" Visible="true" Link="$(BasePathForRequestHandler)%(FileName)%(Extension)" />
|
|
<None Include="$(MSBuildThisFileDirectory)..\src\AspNetCoreModuleV2\AspNetCore\bin\$(Configuration)\$(NativeFolder)\aspnetcore.dll" CopyToOutputDirectory="PreserveNewest" Visible="true" Link="$(NativePlatform)\%(FileName)%(Extension)" />
|
|
<None Include="$(MSBuildThisFileDirectory)..\src\AspNetCoreModuleV2\AspNetCore\bin\$(Configuration)\$(NativeFolder)\aspnetcore.pdb" CopyToOutputDirectory="PreserveNewest" Visible="true" Link="$(NativePlatform)\%(FileName)%(Extension)" />
|
|
</ItemGroup>
|
|
<ItemGroup Condition="'$(OS)' == 'Windows_NT' AND '$(ANCMVersion)' == 'V1'">
|
|
<None Include="$(MSBuildThisFileDirectory)..\src\AspNetCoreModuleV1\AspNetCore\bin\$(Configuration)\$(NativeFolder)\aspnetcore.dll" CopyToOutputDirectory="PreserveNewest" Visible="true" Link="$(NativePlatform)\%(FileName)%(Extension)" />
|
|
<None Include="$(MSBuildThisFileDirectory)..\src\AspNetCoreModuleV1\AspNetCore\bin\$(Configuration)\$(NativeFolder)\aspnetcore.pdb" CopyToOutputDirectory="PreserveNewest" Visible="true" Link="$(NativePlatform)\%(FileName)%(Extension)" />
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup>
|
|
<IISExpressArguments>/config:"$(IISExpressAppHostConfig)"</IISExpressArguments>
|
|
<IISArguments>-h "$(IISAppHostConfig)"</IISArguments>
|
|
|
|
<AncmPath>$(NativePlatform)\aspnetcore.dll</AncmPath>
|
|
<AncmRHPath>$(NativePlatform)\aspnetcorerh.dll</AncmRHPath>
|
|
<DotNetPath>$(userprofile)\.dotnet\$(NativePlatform)\dotnet.exe</DotNetPath>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="CopyLaunchSettings" AfterTargets="CoreBuild">
|
|
<!-- This would always override launch settings files in test projects by the default one -->
|
|
<Copy SourceFiles="$(MSBuildThisFileDirectory)launchSettings.json" DestinationFolder="$(MSBuildProjectDirectory)\Properties" />
|
|
</Target>
|
|
|
|
<!-- Deps file injection-->
|
|
<ItemGroup>
|
|
<ProjectReference Include="$(MSBuildThisFileDirectory)..\test\TestTasks\TestTasks.csproj">
|
|
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
|
|
</ProjectReference>
|
|
</ItemGroup>
|
|
|
|
|
|
<Target Name="PrepareInjectionApp" Condition="'$(ANCMVersion)' == 'V2' Or '$(ANCMVersion)' == ''">
|
|
<PropertyGroup>
|
|
<InjectDepsAssembly>$(MSBuildThisFileDirectory)..\test\TestTasks\bin\$(Configuration)\$(TargetFramework)\TestTasks</InjectDepsAssembly>
|
|
|
|
<InjectDepsApp Condition="'$(TargetFramework)' == 'net461'">$(InjectDepsAssembly)</InjectDepsApp>
|
|
<InjectDepsArguments>"win7-$(NativePlatform)" "$(AncmRHPath)"</InjectDepsArguments>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
|
|
<InjectDepsAssembly>$(InjectDepsAssembly).exe</InjectDepsAssembly>
|
|
<InjectDepsApp>$(InjectDepsAssembly)</InjectDepsApp>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(TargetFramework)' != 'net461'">
|
|
<InjectDepsAssembly>$(InjectDepsAssembly).dll</InjectDepsAssembly>
|
|
<InjectDepsApp>dotnet</InjectDepsApp>
|
|
<InjectDepsArguments>$(InjectDepsAssembly) $(InjectDepsArguments)</InjectDepsArguments>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
<Target Name="InjectRequestHandler" AfterTargets="GenerateBuildDependencyFile" DependsOnTargets="PrepareInjectionApp" Condition="'$(ANCMVersion)' == 'V2' Or '$(ANCMVersion)' == ''">
|
|
<Exec Command="$(InjectDepsApp) $(InjectDepsArguments) "$(ProjectDepsFilePath)"" />
|
|
</Target>
|
|
|
|
<Target Name="InjectRequestHandlerOnPublish" AfterTargets="GeneratePublishDependencyFile" DependsOnTargets="PrepareInjectionApp" Condition="'$(ANCMVersion)' == 'V2' Or '$(ANCMVersion)' == ''">
|
|
<Exec Command="$(InjectDepsApp) $(InjectDepsArguments) "$(PublishDepsFilePath)"" />
|
|
</Target>
|
|
|
|
</Project>
|