blob: 74931a96ee8313c0e2c9da87ec308be4bb351e88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
<Project Sdk="Microsoft.Build.Traversal">
<PropertyGroup>
<TraversalGlobalProperties>BuildAllProjects=true</TraversalGlobalProperties>
</PropertyGroup>
<!-- Explicitly build the runtime.depproj project first to correctly set up the testhost. -->
<ItemGroup>
<RuntimeProject Include="restore\runtime\runtime.depproj" />
<ProjectReference Include="@(RuntimeProject)" Condition="'$(MSBuildRestoreSessionId)' != ''" />
</ItemGroup>
<Target Name="RestoreTestHost"
BeforeTargets="Build">
<MSBuild Targets="Build"
Projects="@(RuntimeProject)"
Properties="$(TraversalGlobalProperties)" />
</Target>
<!-- Microsoft.XmlSerializer.Generator should not be marked as a platform item and be copy-local instead. -->
<Target Name="CollectSharedFrameworkRuntimeFiles"
Condition="'$(PlatformManifestFile)' != '' and '$(BuildingNETCoreAppVertical)' == 'true'">
<ItemGroup>
<_manualSharedFrameworkRuntimeFiles Include="System.Security.Cryptography.Native.OpenSsl.so" />
<_manualSharedFrameworkRuntimeFiles Include="System.Security.Cryptography.Native.Apple.dylib" />
<_manualSharedFrameworkRuntimeFiles Include="System.Security.Cryptography.Native.OpenSsl.dylib" />
</ItemGroup>
<ItemGroup>
<SharedFrameworkRuntimeFiles Include="$(TestHostRuntimePath)*;@(_manualSharedFrameworkRuntimeFiles->'$(TestHostRuntimePath)%(Identity)')"
Exclude="$(TestHostRuntimePath)dotnet-Microsoft.XmlSerializer.Generator.*"
TargetPath="runtimes/" />
</ItemGroup>
</Target>
<UsingTask TaskName="GenerateFileVersionProps" AssemblyFile="$(InstallerTasksAssemblyPath)"/>
<Target Name="GenerateFileVersionProps"
DependsOnTargets="CollectSharedFrameworkRuntimeFiles"
Condition="'$(PlatformManifestFile)' != '' and '$(BuildTargetFramework)' == '$(NetCoreAppCurrent)'"
AfterTargets="RestoreTestHost">
<GenerateFileVersionProps Files="@(SharedFrameworkRuntimeFiles)"
PackageId="Microsoft.NETCore.App"
PackageVersion="$(ProductVersion)"
PlatformManifestFile="$(PlatformManifestFile)"
PreferredPackages="Microsoft.NetCore.App"
PermitDllAndExeFilesLackingFileVersion="true" />
</Target>
<!--
Shared framework deps file generation.
Produces a test shared-framework deps file.
To use invoke target directly specifying NETCoreAppTestSharedFrameworkPath property.
-->
<UsingTask TaskName="GenerateTestSharedFrameworkDepsFile" AssemblyFile="$(InstallerTasksAssemblyPath)"/>
<Target Name="GenerateTestSharedFrameworkDepsFile"
Condition="'$(BinplaceTestSharedFramework)' == 'true' and '$(BuildTargetFramework)' == '$(NetCoreAppCurrent)'"
AfterTargets="RestoreTestHost">
<GenerateTestSharedFrameworkDepsFile SharedFrameworkDirectory="$(NETCoreAppTestSharedFrameworkPath)"
RuntimeGraphFiles="$(RuntimeIdGraphDefinitionFile)"
TargetRuntimeIdentifier="$(PackageRID)" />
</Target>
</Project>
|