Skip to content

Commit c48ef02

Browse files
authored
changing netcoreapp targetframework from 3.0 to 5.0 and adding support for targetgroup = netcoreapp5.0 (dotnet/corefx#40049)
* adding 5.0 target moniker * Restoring packages for netcoreapp3.0 * package config for crypto done * Drawing.Common and System.Windows.Extensions done * some left over crypto and some smaller other libraries * security.permissions, WindowsRuntime, WindowsRuntime.Xaml done * experimental projects and openssl cryptography * harvesting the runtime package version for windows Runtime * update VS configurations * reverting the shared framework package * some remaining projects * Using sdk to restore package and targetFrameowrk for netcoreapp3.0 * removing harvesting and using ReferenceFromRuntime for windowsRuntime project * For oob packages with no pkg folder * addresses feedback * addresses the feedback * reverting a commit with extra packageconfig additions * System.text.Encoding.Web configurations edited Commit migrated from dotnet/corefx@777dbde
1 parent 68b6d3f commit c48ef02

84 files changed

Lines changed: 320 additions & 198 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

eng/configurations/targetgroups.props

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,21 @@
122122
<CompatibleWith>netstandard</CompatibleWith>
123123
</TargetGroups>
124124
<TargetGroups Include="netcoreapp3.0">
125-
<NETCoreAppMaximumVersion>3.0</NETCoreAppMaximumVersion>
126125
<TargetFramework>netcoreapp3.0</TargetFramework>
127126
<Imports>netcoreapp2.2</Imports>
128127
<CompatibleWith>netstandard2.1</CompatibleWith>
129128
</TargetGroups>
130-
<!-- netcoreapp is an alias for netcoreapp3.0 -->
131-
<TargetGroups Include="netcoreapp">
132-
<NETCoreAppMaximumVersion>3.0</NETCoreAppMaximumVersion>
133-
<TargetFramework>netcoreapp3.0</TargetFramework>
129+
<TargetGroups Include="netcoreapp5.0">
130+
<TargetFramework>netcoreapp5.0</TargetFramework>
134131
<Imports>netcoreapp3.0</Imports>
135132
<CompatibleWith>netstandard2.1</CompatibleWith>
136133
</TargetGroups>
134+
<!-- netcoreapp is an alias for netcoreapp5.0 -->
135+
<TargetGroups Include="netcoreapp">
136+
<TargetFramework>netcoreapp5.0</TargetFramework>
137+
<Imports>netcoreapp5.0</Imports>
138+
<CompatibleWith>netstandard2.1</CompatibleWith>
139+
</TargetGroups>
137140
<TargetGroups Include="net45">
138141
<TargetFramework>net45</TargetFramework>
139142
<TargetingPackNugetPackageId>Microsoft.TargetingPack.NETFramework.v4.5</TargetingPackNugetPackageId>

eng/restore/dirs.proj

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<Project InitialTargets="IncludeProjectReferences">
2-
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
1+
<Project>
2+
<Import Project="Directory.Build.props" />
33

44
<PropertyGroup>
55
<AdditionalBuildConfigurations>$(AdditionalBuildConfigurations);netstandard-$(OSGroup)-$(ConfigurationGroup)-$(ArchGroup)</AdditionalBuildConfigurations>
@@ -17,24 +17,5 @@
1717
<Project Include="binplacePackages/binplacePackages.depproj" />
1818
</ItemGroup>
1919

20-
<!-- Set up project references to use the sdk restore target. -->
21-
<Target Name="IncludeProjectReferences" DependsOnTargets="FilterProjects">
22-
<ItemGroup>
23-
<ProjectReference Include="@(Project)" />
24-
</ItemGroup>
25-
</Target>
26-
27-
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
28-
29-
<!-- Overwrite the SDK build target. -->
30-
<Target Name="Build" DependsOnTargets="FilterProjects">
31-
<MSBuild Targets="Build"
32-
Projects="@(Project)"
33-
Properties="BuildConfiguration=$(BuildConfiguration);%(Project.AdditionalProperties)"
34-
BuildInParallel="true"
35-
ContinueOnError="ErrorAndStop" />
36-
37-
<!-- Given we ErrorAndContinue we need to propagate the error if the overall task failed -->
38-
<Error Condition="'$(MSBuildLastTaskResult)'=='false'" />
39-
</Target>
20+
<Import Project="$(RepositoryEngineeringDir)dir.traversal.targets" />
4021
</Project>

eng/restore/netcoreapp/Configurations.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<BuildConfigurations>
44
netcoreapp2.0;
55
netcoreapp2.1;
6+
netcoreapp3.0;
67
</BuildConfigurations>
78
</PropertyGroup>
89
</Project>

eng/restore/netcoreapp/netcoreapp.depproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,23 @@
55
<NuGetDeploySourceItem>Reference</NuGetDeploySourceItem>
66
<NETCoreAppPackageVersion Condition="'$(TargetFramework)' == 'netcoreapp2.0'">2.0.7</NETCoreAppPackageVersion>
77
<NETCoreAppPackageVersion Condition="'$(TargetFramework)' == 'netcoreapp2.1'">2.1.3</NETCoreAppPackageVersion>
8+
<!-- These needs to be replaced once we have a RTM -->
9+
<RuntimeFrameworkVersion Condition="'$(TargetFramework)' == 'netcoreapp3.0'">3.0.0-preview7-27912-14</RuntimeFrameworkVersion>
10+
<DisableImplicitFrameworkReferences Condition="'$(TargetFramework)' == 'netcoreapp3.0'">false</DisableImplicitFrameworkReferences>
811
<BinPlaceRef>true</BinPlaceRef>
912
</PropertyGroup>
1013

11-
<ItemGroup>
14+
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.0'">
1215
<PackageReference Include="Microsoft.NETCore.App">
1316
<Version>$(NETCoreAppPackageVersion)</Version>
1417
</PackageReference>
1518
</ItemGroup>
19+
20+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
21+
<KnownFrameworkReference Update="Microsoft.NETCore.App"
22+
TargetingPackVersion="$(RuntimeFrameworkVersion)"
23+
/>
24+
</ItemGroup>
1625

1726
<ItemGroup>
1827
<!-- for all configurations this project provides refs for that configuration -->

eng/restore/runtime/Configurations.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<Project>
22
<PropertyGroup>
33
<BuildConfigurations>
4+
netcoreapp3.0-Windows_NT;
5+
netcoreapp3.0-Unix;
46
netcoreapp-Windows_NT;
57
netcoreapp-Unix;
68
uap10.0.16299;

eng/restore/runtime/runtime.depproj

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,20 @@
1111
<PackageReference Include="Microsoft.DiaSymReader.Native" Version="1.7.0" />
1212
</ItemGroup>
1313

14+
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
15+
<!-- These needs to be replaced once we have an official build -->
16+
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>3.0.0-preview9-19407-2</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
17+
<MicrosoftPrivateCorefxNETCoreAppVersion>4.6.0-preview9.19419.3</MicrosoftPrivateCorefxNETCoreAppVersion>
18+
</PropertyGroup>
19+
20+
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.16299'">
21+
<!-- Following is version used in release/uwp6.0 -->
22+
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>2.1.0-b-uwp6-25707-02</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
23+
</PropertyGroup>
24+
1425
<ItemGroup>
1526
<PackageReference Include="Microsoft.NETCore.Platforms" Version="$(MicrosoftNETCorePlatformsPackageVersion)" />
16-
<PackageReference Include="transport.Microsoft.NETCore.Runtime.CoreCLR">
17-
<Version>$(MicrosoftNETCoreRuntimeCoreCLRPackageVersion)</Version>
18-
<!-- Following is version used in release/uwp6.0 -->
19-
<Version Condition="'$(TargetFramework)'=='uap10.0.16299'">2.1.0-b-uwp6-25707-02</Version>
20-
</PackageReference>
27+
<PackageReference Include="transport.Microsoft.NETCore.Runtime.CoreCLR" Version="$(MicrosoftNETCoreRuntimeCoreCLRPackageVersion)" />
2128
<PackageReference Include="Microsoft.NETCore.TestHost" Version="$(MicrosoftNETCoreRuntimeCoreCLRPackageVersion)" />
2229
<PackageReference Include="runtime.native.System.Data.SqlClient.sni" Version="$(RuntimeNativeSystemDataSqlClientSniPackageVersion)" />
2330
<PackageReference Include="Microsoft.NETCore.DotNetHost" Version="$(MicrosoftNETCoreDotNetHostPackageVersion)" />
@@ -28,6 +35,10 @@
2835
<FileToExclude Include="apphost" />
2936
</ItemGroup>
3037

38+
<ItemGroup>
39+
<PackageReference Condition="'$(TargetFramework)' == 'netcoreapp3.0'" Include="Microsoft.Private.Corefx.NETCoreApp" Version="$(MicrosoftPrivateCorefxNETCoreAppVersion)" />
40+
</ItemGroup>
41+
3142
<!-- Setup the testing shared framework host -->
3243
<Target Name="SetupTestingHost"
3344
Condition="'$(BinPlaceTestSharedFramework)' == 'true'"

eng/restore/winrt/Configurations.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project>
22
<PropertyGroup>
33
<BuildConfigurations>
4+
netcoreapp3.0;
45
netcoreapp;
56
uap;
67
netstandard1.0;

src/libraries/Common/src/System/Security/Cryptography/Asn1Reader/AsnCharacterStringEncodings.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public override int GetByteCount(string s)
5858
}
5959

6060
public
61-
#if netcoreapp || uap || NETCOREAPP || netstandard21
61+
#if netcoreapp || netcoreapp30 || uap || NETCOREAPP || netstandard21
6262
override
6363
#endif
6464
int GetByteCount(ReadOnlySpan<char> chars)
@@ -93,7 +93,7 @@ public override unsafe int GetCharCount(byte* bytes, int count)
9393
}
9494

9595
public
96-
#if netcoreapp || uap || NETCOREAPP || netstandard21
96+
#if netcoreapp || netcoreapp30 || uap || NETCOREAPP || netstandard21
9797
override
9898
#endif
9999
int GetCharCount(ReadOnlySpan<byte> bytes)
@@ -397,7 +397,7 @@ public override int GetByteCount(string s)
397397
return s_utf8Encoding.GetByteCount(s);
398398
}
399399

400-
#if netcoreapp || uap || NETCOREAPP || netstandard21
400+
#if netcoreapp || netcoreapp30 || uap || NETCOREAPP || netstandard21
401401
public override int GetByteCount(ReadOnlySpan<char> chars)
402402
{
403403
return s_utf8Encoding.GetByteCount(chars);
@@ -438,7 +438,7 @@ public override unsafe int GetCharCount(byte* bytes, int count)
438438
}
439439
}
440440

441-
#if netcoreapp || uap || NETCOREAPP || netstandard21
441+
#if netcoreapp || netcoreapp30 || uap || NETCOREAPP || netstandard21
442442
public override int GetCharCount(ReadOnlySpan<byte> bytes)
443443
{
444444
try

src/libraries/Common/src/System/Security/Cryptography/CryptoPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal static void Return(byte[] array, int clearSize = ClearAll)
2020

2121
if (!clearWholeArray && clearSize != 0)
2222
{
23-
#if netcoreapp || uap || NETCOREAPP || netstandard21
23+
#if netcoreapp || netcoreapp30 || uap || NETCOREAPP || netstandard21
2424
CryptographicOperations.ZeroMemory(array.AsSpan(0, clearSize));
2525
#else
2626
Array.Clear(array, 0, clearSize);

src/libraries/Common/tests/CoreFx.Private.TestUtilities/CoreFx.Private.TestUtilities.csproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
This assembly is referenced from rid agnostic configurations therefore we can't make it RID specific
88
and instead use runtime checks.
99
-->
10-
<Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
10+
<Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
1111
</PropertyGroup>
12-
1312
<ItemGroup>
1413
<Compile Include="System\AdminHelpers.cs" />
1514
<Compile Include="System\AssertExtensions.cs" />
@@ -73,11 +72,10 @@
7372
<Link>Common\Interop\Unix\Interop.GetEUid.cs</Link>
7473
</Compile>
7574
</ItemGroup>
76-
7775
<ItemGroup>
7876
<PackageReference Include="Microsoft.DotNet.XUnitExtensions" Version="$(MicrosoftDotNetXUnitExtensionsPackageVersion)" />
7977
<PackageReference Include="xunit.core" Version="$(XUnitPackageVersion)" ExcludeAssets="build" />
8078
<PackageReference Include="xunit.assert" Version="$(XUnitPackageVersion)" />
8179
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(MicrosoftDotNetPlatformAbstractionsPackageVersion)" />
8280
</ItemGroup>
83-
</Project>
81+
</Project>

0 commit comments

Comments
 (0)