|
3 | 3 | <Import Project="..\..\Directory.Build.targets" />
|
4 | 4 |
|
5 | 5 | <PropertyGroup>
|
| 6 | + <!-- Disable RAR from transitively discovering dependencies for references. This is required as we don't copy |
| 7 | + dependencies over into the output directory which means RAR can't resolve them. |
| 8 | + This is also necessary to make P2Ps with same package ids but different versions work. --> |
| 9 | + <_FindDependencies>false</_FindDependencies> |
| 10 | + |
6 | 11 | <CustomizationsPropsPath>$(MSBuildProjectDirectory)\$(CustomizationsPropsFile)</CustomizationsPropsPath>
|
7 | 12 | <CustomizationsSourcePath>$(MSBuildProjectDirectory)\$(CustomizationsSourceFile)</CustomizationsSourcePath>
|
8 | 13 | </PropertyGroup>
|
9 | 14 |
|
| 15 | + <!-- Project references don't need to be copied to the output. That makes the build significantly faster. --> |
| 16 | + <ItemDefinitionGroup> |
| 17 | + <ProjectReference> |
| 18 | + <Private>false</Private> |
| 19 | + </ProjectReference> |
| 20 | + </ItemDefinitionGroup> |
| 21 | + |
10 | 22 | <ItemGroup>
|
11 | 23 | <Compile Include="ref/$(TargetFramework)/*$(DefaultLanguageSourceExtension)" />
|
12 | 24 | <Compile Include="lib/$(TargetFramework)/*$(DefaultLanguageSourceExtension)" />
|
|
21 | 33 | <!-- Customization extension point -->
|
22 | 34 | <Import Project="$(CustomizationsPropsPath)" Condition="Exists('$(CustomizationsPropsPath)')" />
|
23 | 35 |
|
24 |
| - <!-- |
25 |
| - ### Targeting Packs section ### |
26 |
| - Keep in sync with available targeting packs under src/targetPacks/ILsrc. |
27 |
| - --> |
28 |
| - |
29 | 36 | <PropertyGroup>
|
| 37 | + <!-- Avoid transitive framework reference downloads to minimize the number of targeting packs and prebuilts. --> |
30 | 38 | <DisableTransitiveFrameworkReferenceDownloads>true</DisableTransitiveFrameworkReferenceDownloads>
|
31 | 39 | <!-- The SDK already sets the NETStandardImplicitPackageVersion and we don't expect it to change anymore. Hence, we don't encode it here. -->
|
32 | 40 | </PropertyGroup>
|
33 | 41 |
|
| 42 | + <!-- Keep in sync with available targeting packs under src/targetPacks/ILsrc. --> |
34 | 43 | <ItemGroup>
|
35 | 44 | <KnownFrameworkReference Update="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.NETCore.App'))">
|
36 | 45 | <TargetingPackVersion Condition="'%(TargetFramework)' == 'netcoreapp3.0'">3.0.0</TargetingPackVersion>
|
37 | 46 | <TargetingPackVersion Condition="'%(TargetFramework)' == 'netcoreapp3.1'">3.1.0</TargetingPackVersion>
|
38 | 47 | <TargetingPackVersion Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(TargetFramework)', '^net\d+\.0$'))">$([System.Text.RegularExpressions.Regex]::Match('%(TargetFramework)', '\d+').Value).0.0</TargetingPackVersion>
|
39 | 48 | </KnownFrameworkReference>
|
40 | 49 |
|
| 50 | + <KnownFrameworkReference Update="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.AspNetCore.App'))"> |
| 51 | + <TargetingPackVersion Condition="'%(TargetFramework)' == 'net6.0'">6.0.2</TargetingPackVersion> |
| 52 | + </KnownFrameworkReference> |
| 53 | + |
41 | 54 | <KnownFrameworkReference Update="@(KnownFrameworkReference->WithMetadataValue('Identity', 'NETStandard.Library'))">
|
42 | 55 | <TargetingPackVersion Condition="'%(TargetFramework)' == 'netstandard2.1'">2.1.0</TargetingPackVersion>
|
43 | 56 | </KnownFrameworkReference>
|
|
58 | 71 | DependsOnTargets="ResolveProjectReferences"
|
59 | 72 | AfterTargets="ResolveTargetingPackAssets">
|
60 | 73 | <ItemGroup>
|
61 |
| - <_targetingPackReferenceExclusion Include="$(TargetName)" /> |
62 |
| - </ItemGroup> |
63 |
| - <ItemGroup> |
64 |
| - <_targetingPackReferenceWithProjectName Include="@(Reference->WithMetadataValue('ExternallyResolved', 'true')->Metadata('Filename'))" |
65 |
| - OriginalIdentity="%(Identity)" /> |
66 |
| - <_targetingPackIncludedReferenceWithProjectName Include="@(_targetingPackReferenceWithProjectName)" |
67 |
| - Exclude="@(_targetingPackReferenceExclusion)" /> |
68 |
| - <_targetingPackExcludedReferenceWithProjectName Include="@(_targetingPackReferenceWithProjectName)" |
69 |
| - Exclude="@(_targetingPackIncludedReferenceWithProjectName)" /> |
70 |
| - <Reference Remove="@(_targetingPackExcludedReferenceWithProjectName->Metadata('OriginalIdentity'))" /> |
| 74 | + <Reference Remove="@(Reference->WithMetadataValue('ExternallyResolved', 'true')->WithMetadataValue('Filename', '$(TargetName)'))" /> |
71 | 75 | </ItemGroup>
|
72 | 76 | </Target>
|
73 | 77 |
|
74 | 78 | <Target Name="CopyBuildOutputToTempOutput"
|
75 | 79 | AfterTargets="CopyFilesToOutputDirectory">
|
76 |
| - |
77 | 80 | <ItemGroup>
|
78 | 81 | <CompileWithRelativePath Include="@(Compile)" Condition="!$([System.String]::new('%(Identity)').StartsWith('%(RootDir)'))" />
|
79 | 82 | </ItemGroup>
|
|
0 commit comments