Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Hofer <viktor.hofer@microsoft.com>2019-10-29 14:44:25 +0300
committerGitHub <noreply@github.com>2019-10-29 14:44:25 +0300
commit61b525770e280602f74a8e20047fb5653be35881 (patch)
tree86060b18c74ab84a416df5178831fe6382c9a4b7 /eng/packaging.targets
parent269553bd8af1e98d792d34c870f61b9e6f1a9cf8 (diff)
Prepare corefx for repo consolidation (dotnet/corefx#42175)
* Prepare corefx for repo consolidation into runtime Commit migrated from https://github.com/dotnet/corefx/commit/e160dd972d958fbe9594dc1001da4d1b94bba949
Diffstat (limited to 'eng/packaging.targets')
-rw-r--r--eng/packaging.targets35
1 files changed, 35 insertions, 0 deletions
diff --git a/eng/packaging.targets b/eng/packaging.targets
new file mode 100644
index 00000000000..6bc626451ca
--- /dev/null
+++ b/eng/packaging.targets
@@ -0,0 +1,35 @@
+<Project>
+ <!-- Add validation for netcoreapp5.0 to package build and testing -->
+ <ItemGroup>
+ <DefaultValidateFramework Include="netcoreapp5.0" RuntimeIDs="@(NETCoreApp30RIDs)" />
+ <DefaultValidateFramework Remove="uap10.0.16300" />
+ </ItemGroup>
+
+ <!-- There are some packages where we require only one ref for a specific framework to be present. In order to avoid problems with this package when targetting
+ dektop with RAR we will make sure there are no exclude=compile references in the package.
+ For more info, please check issues:
+ - https://github.com/dotnet/corefx/issues/32457 -> Why reference assets were removed from the package
+ - https://github.com/aspnet/AspNetCore/issues/11206 -> Why ASP.NET required a ref to be added back for netcoreapp
+ - https://github.com/dotnet/corefx/issues/38729 -> Issue tracking to work of readding a ref to netcoreapp -->
+ <Target Name="RemoveExcludeCompileFromPackageDependencies" Condition="'$(RemoveExcludeCompileFromPackageDependencies)' == 'true'" DependsOnTargets="GetPackageDependencies" BeforeTargets="ValidateExcludeCompileDesktop">
+ <ItemGroup>
+ <Dependency>
+ <Exclude></Exclude>
+ </Dependency>
+ </ItemGroup>
+ </Target>
+
+ <Target Name="ValidateExcludeCompileDesktop"
+ AfterTargets="GetPackageDependencies"
+ Inputs="%(Dependency.Identity);%(Dependency.TargetFramework)"
+ Outputs="unused"
+ Condition="'$(SkipValidatePackage)' != 'true'">
+ <PropertyGroup>
+ <_excludeCompile Condition="@(Dependency->WithMetadataValue('Exclude', 'Compile')->Count()) == @(Dependency->Count())">true</_excludeCompile>
+ </PropertyGroup>
+ <Error Text="Cannot have Exclude=Compile dependencies when targeting a desktop TFM. @(Dependency). You can exclude the reference asset in the package by setting the ExcludeReferenceAssets property to true in your project."
+ Condition="$([System.String]::Copy('%(Dependency.TargetFramework)').StartsWith('net4')) AND
+ '$(_excludeCompile)' == 'true' AND
+ '%(Dependency.Identity)' != '_._'" />
+ </Target>
+</Project> \ No newline at end of file