Update package testing to test for 5.0 and use the SDK targeting pack for 3.0
authorSantiago Fernandez Madero <safern@microsoft.com>
Fri, 19 Jul 2019 22:48:01 +0000 (15:48 -0700)
committerSantiago Fernandez Madero <safern@microsoft.com>
Tue, 23 Jul 2019 21:12:02 +0000 (14:12 -0700)
Commit migrated from https://github.com/dotnet/corefx/commit/e733500d11ae73f5ddba17b75127f1b3033c470c

eng/Packaging.targets
src/libraries/pkg/Microsoft.Private.PackageBaseline/packageIndex.json
src/libraries/pkg/test/frameworkSettings/netcoreapp3.0/settings.targets
src/libraries/pkg/test/frameworkSettings/netcoreapp5.0/settings.targets [new file with mode: 0644]
src/libraries/pkg/test/props/Directory.Build.props

index b350be6..6d9f468 100644 (file)
@@ -1,4 +1,11 @@
 <Project>
+  <!-- Add validation for netcoreapp5.0 to package build and testing -->
+  <ItemGroup>
+    <DefaultValidateFramework Include="netcoreapp5.0">
+      <RuntimeIDs>@(NETCoreApp30RIDs)</RuntimeIDs>
+    </DefaultValidateFramework>
+  </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:
index 4732e77..7cad4c6 100644 (file)
         "1.1.0",
         "1.2.0"
       ],
-      "BaselineVersion": "1.3.0",
+      "BaselineVersion": "1.4.0",
       "InboxOn": {},
       "AssemblyVersionInPackageVersion": {
         "1.0.31.0": "1.0.31",
         "1.1.0",
         "1.2.0"
       ],
-      "BaselineVersion": "1.3.0",
+      "BaselineVersion": "1.4.0",
       "InboxOn": {},
       "AssemblyVersionInPackageVersion": {
         "1.0.31.0": "1.0.31",
         "1.1.0",
         "1.2.0"
       ],
-      "BaselineVersion": "1.3.0",
+      "BaselineVersion": "1.4.0",
       "InboxOn": {},
       "AssemblyVersionInPackageVersion": {
         "1.0.31.0": "1.0.31",
         "1.1.0",
         "1.2.0"
       ],
-      "BaselineVersion": "1.3.0",
+      "BaselineVersion": "1.4.0",
       "InboxOn": {},
       "AssemblyVersionInPackageVersion": {
         "1.0.31.0": "1.0.31",
index 91bb931..26049f4 100644 (file)
@@ -1,29 +1,10 @@
 <Project>
-  <PropertyGroup>
-    <!-- Enable targeting netcoreapp3.0 even in an older CLI -->
-    <NETCoreAppMaximumVersion>3.0</NETCoreAppMaximumVersion>
-    <!-- use the most recent MS.NETCore.App we have from upstack -->
-    <RuntimeFrameworkVersion>$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
-    <DisableImplicitNETCorePlatformsReference>true</DisableImplicitNETCorePlatformsReference>
-  </PropertyGroup>
-
   <ItemGroup>
-    <!-- SDK doesn't honor RuntimeFrameworkVersion for targeting pack-->
-    <KnownFrameworkReference Update="Microsoft.NETCore.App" TargetingPackVersion="$(RuntimeFrameworkVersion)" />
+    <!-- We can remove this workaround until we retarget corefx to 5.0 -->
+    <IgnoredReference Include="System.Private.CoreLib" />
 
     <!-- Temporary till SDK supports transitive framework references. -->
     <KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
     <KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App" />
   </ItemGroup>
-  <ItemGroup>
-    <!-- CodePages is part of the framework but we don't yet have a MicrosoftNETCoreAppPackageVersion with that change -->
-    <IgnoredReference Include="System.Text.Encoding.CodePages"/>
-
-    <!-- Temporarily suppress checking System.Private.CoreLib until we get a new MicrosoftNETCoreAppPackageVersion built against a 5.0 version of it -->
-    <IgnoredReference Include="System.Private.CoreLib" />
-  </ItemGroup>
-  <Target Name="CheckForWorkaroundRemoval" AfterTargets="ResolveReferences">
-    <Error Condition="'%(Reference.FileName)' == 'System.Text.Encoding.CodePages' AND '%(Reference.NuGetPackageId)' == 'Microsoft.NETCore.App'"
-           Text="Please remove IgnoredReference workaround from pkg\test\frameworkSettings\netcoreapp3.0\settings.targets" />
-  </Target>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/src/libraries/pkg/test/frameworkSettings/netcoreapp5.0/settings.targets b/src/libraries/pkg/test/frameworkSettings/netcoreapp5.0/settings.targets
new file mode 100644 (file)
index 0000000..185f288
--- /dev/null
@@ -0,0 +1,33 @@
+<Project>
+  <PropertyGroup>
+    <TargetFramework>netcoreapp5.0</TargetFramework>
+    <NETCoreAppMaximumVersion>5.0</NETCoreAppMaximumVersion>
+    <RuntimeFrameworkVersion>$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <!-- Since we don't have an SDK that knows about 5.0 framework, we should specify it manually. -->
+    <KnownFrameworkReference Update="Microsoft.NETCore.App"
+                            TargetFramework="$(TargetFramework)"
+                            RuntimeFrameworkName="Microsoft.NETCore.App"
+                            DefaultRuntimeFrameworkVersion="$(RuntimeFrameworkVersion)"
+                            LatestRuntimeFrameworkVersion="$(RuntimeFrameworkVersion)"
+                            TargetingPackName="Microsoft.NETCore.App.Ref"
+                            TargetingPackVersion="$(RuntimeFrameworkVersion)"
+                            RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.**RID**"
+                            RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86"
+                            PackagesToReference="Microsoft.NETCore.App/$(RuntimeFrameworkVersion)"
+                            IsTrimmable="true"
+                            />
+
+    <KnownAppHostPack Update="Microsoft.NETCore.App"
+                      TargetFramework="$(TargetFramework)"
+                      AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**"
+                      AppHostPackVersion="$(RuntimeFrameworkVersion)"
+                      AppHostRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86"
+                      />
+
+    <KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
+    <KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
index 436249c..537832e 100644 (file)
@@ -1,5 +1,6 @@
 <Project>
   <PropertyGroup>
     <ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
+    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
   </PropertyGroup>
 </Project>