Skip to content

Commit

Permalink
Update package testing to test for 5.0 and use the SDK targeting pack…
Browse files Browse the repository at this point in the history
… for 3.0
  • Loading branch information
safern committed Jul 23, 2019
1 parent f05e7e9 commit e733500
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 26 deletions.
7 changes: 7 additions & 0 deletions eng/Packaging.targets
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
8 changes: 4 additions & 4 deletions pkg/Microsoft.Private.PackageBaseline/packageIndex.json
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@
"1.1.0",
"1.2.0"
],
"BaselineVersion": "1.3.0",
"BaselineVersion": "1.4.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"1.0.31.0": "1.0.31",
Expand Down Expand Up @@ -1094,7 +1094,7 @@
"1.1.0",
"1.2.0"
],
"BaselineVersion": "1.3.0",
"BaselineVersion": "1.4.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"1.0.31.0": "1.0.31",
Expand All @@ -1109,7 +1109,7 @@
"1.1.0",
"1.2.0"
],
"BaselineVersion": "1.3.0",
"BaselineVersion": "1.4.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"1.0.31.0": "1.0.31",
Expand All @@ -1124,7 +1124,7 @@
"1.1.0",
"1.2.0"
],
"BaselineVersion": "1.3.0",
"BaselineVersion": "1.4.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"1.0.31.0": "1.0.31",
Expand Down
25 changes: 3 additions & 22 deletions pkg/test/frameworkSettings/netcoreapp3.0/settings.targets
Original file line number Diff line number Diff line change
@@ -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>
33 changes: 33 additions & 0 deletions pkg/test/frameworkSettings/netcoreapp5.0/settings.targets
Original file line number Diff line number Diff line change
@@ -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>
1 change: 1 addition & 0 deletions pkg/test/props/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project>
<PropertyGroup>
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>

0 comments on commit e733500

Please sign in to comment.