Skip to content

Commit 0011928

Browse files
committed
Added back support for netstandard2.0 and netfx
Adding System.ServiceModel.dll shim to Primitives lib/net8.0 Add placeholder file to stop package being used on older runtimes Adding System.ServiceModel.dll shim to Primitives lib/net8.0
1 parent 1634b13 commit 0011928

File tree

63 files changed

+9715
-1477
lines changed

Some content is hidden

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

63 files changed

+9715
-1477
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ build/
2525
bld/
2626
[Bb]in/
2727
[Oo]bj/
28-
msbuild.binlog
28+
*.binlog
2929
msbuild.log
3030
msbuild.err
3131
msbuild.wrn

Directory.Build.props

+8-7
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@
99
<Ship_SvcUtilXmlSerPackages Condition="'$(Ship_SvcUtilXmlSerPackages)'==''">false</Ship_SvcUtilXmlSerPackages>
1010
<Ship_SvcUtilPackages Condition="'$(Ship_SvcUtilPackages)'==''">false</Ship_SvcUtilPackages>
1111
<Ship_WcfPackages Condition="'$(Ship_WcfPackages)'==''">true</Ship_WcfPackages>
12+
<PlaceholderFile>$(RepositoryEngineeringDir)_._</PlaceholderFile>
1213
</PropertyGroup>
1314

14-
<!-- Include license and third party files to packages -->
15-
<ItemGroup>
16-
<Content Include="$(RepoRoot)THIRD-PARTY-NOTICES.TXT" Pack="true" PackagePath="\" />
17-
<Content Include="$(RepoRoot)LICENSE.TXT" Pack="true" PackagePath="\" />
18-
</ItemGroup>
15+
<PropertyGroup>
16+
<NetFrameworkVersion>net462</NetFrameworkVersion>
17+
<DotNetVersion>net8.0</DotNetVersion>
18+
</PropertyGroup>
1919

2020
<PropertyGroup>
2121
<IsPartialFacadeAssembly Condition="'$(IsPartialFacadeAssembly)'=='' AND ($(MSBuildProjectName.EndsWith('.Facade')))">true</IsPartialFacadeAssembly>
22-
<IsReferenceAssembly Condition="'$(IsReferenceAssembly)'=='' AND ($(MSBuildProjectName.EndsWith('.Ref')))">true</IsReferenceAssembly>
22+
<IsReferenceAssembly Condition="'$(IsReferenceAssembly)' == '' and ($(MSBuildProjectName.EndsWith('.Ref')))">true</IsReferenceAssembly>
23+
<HasReferenceAssembly Condition="'$(IsReferenceAssembly)' != 'true' AND Exists('..\ref\$([System.IO.Path]::GetFileNameWithoutExtension($(MSBuildProjectFile))).Ref.csproj')">true</HasReferenceAssembly>
2324
</PropertyGroup>
2425

2526
<PropertyGroup>
@@ -52,7 +53,7 @@
5253

5354
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
5455
<!-- Microsoft.NET.Test.Sdk package defaults to restore the minimum supported version for its dependency Newtonsoft.Json, here force test project to reference higher version for security reason. -->
55-
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
56+
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
5657
</ItemGroup>
5758

5859
</Project>

Directory.Build.targets

+14-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,26 @@
22
<Project>
33

44
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
5-
<Import Project="eng\FacadeAssemblies.targets" Condition="'$(IsPartialFacadeAssembly)' == 'true'" />
5+
<!-- <Import Project="eng\FacadeAssemblies.targets" Condition="'$(IsPartialFacadeAssembly)' == 'true'" /> -->
6+
<Import Project="eng\GenRefAssembly.targets" Condition="'$(HasReferenceAssembly)' == 'true'" />
7+
<Import Project="eng\ReferenceAssembly.targets" Condition="'$(IsReferenceAssembly)' == 'true'" />
68
<Import Project="eng\testing\runsettings.targets" Condition="'$(EnableRunSettingsSupport)' == 'true'" />
79

10+
<!-- Include license and third party files to packages -->
11+
<ItemGroup Condition="'$(IsShippingPackage)' != 'false'">
12+
<Content Include="$(RepoRoot)THIRD-PARTY-NOTICES.TXT" Pack="true" PackagePath="\" />
13+
<Content Include="$(RepoRoot)LICENSE.TXT" Pack="true" PackagePath="\" />
14+
</ItemGroup>
15+
816
<PropertyGroup>
917
<!-- Disable some standard properties for building our projects -->
1018
<GenerateTargetFrameworkAttribute>true</GenerateTargetFrameworkAttribute>
1119
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
1220
<!-- [todo:arcade] This attribute exists in our previously shipped S.P.SM assembly but not in all the Facade assemblies. For now removing accross all assemblies. -->
1321
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
22+
<!-- We only want to ensure direct dependencies don't have a vulnerability for our packages,
23+
but for unit tests, we want to make sure we aren't using vulnerable versions at runtime -->
24+
<NuGetAuditMode Condition="'$(IsTestProject)' != 'true'">direct</NuGetAuditMode>
1425
</PropertyGroup>
1526

1627
<PropertyGroup>
@@ -46,5 +57,6 @@
4657
<_Parameter1>true</_Parameter1>
4758
</AssemblyAttribute>
4859
</ItemGroup>
49-
60+
61+
<Import Project="eng\RuntimePackages.targets" Condition="'$(StrongNameKeyId)' == 'Microsoft'" />
5062
</Project>

NuGet.config

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
<packageSources>
44
<clear />
55
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
6-
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
76
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
87
</packageSources>
9-
<disabledPackageSources />
8+
<auditSources>
9+
<clear />
10+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
11+
</auditSources>
12+
<disabledPackageSources>
13+
<clear />
14+
</disabledPackageSources>
1015
</configuration>

System.ServiceModel.sln

+42
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,24 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Binding.UDS.IntegrationTest
9191
EndProject
9292
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.NetNamedPipe.Tests", "src\System.ServiceModel.NetNamedPipe\tests\System.ServiceModel.NetNamedPipe.Tests.csproj", "{FD188537-21AF-48C5-84FF-F8758F4C42A8}"
9393
EndProject
94+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.Http.Ref", "src\System.ServiceModel.Http\ref\System.ServiceModel.Http.Ref.csproj", "{34CCEAC9-43B1-4654-BF2F-0B40EC7AD016}"
95+
EndProject
96+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.NetTcp.Ref", "src\System.ServiceModel.NetTcp\ref\System.ServiceModel.NetTcp.Ref.csproj", "{81843CB2-E128-427B-9920-EEDBBBD4CB0B}"
97+
EndProject
98+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Files", "Build Files", "{E7BC33F3-6B4C-44A1-9427-10312E1EAB26}"
99+
ProjectSection(SolutionItems) = preProject
100+
Directory.Build.props = Directory.Build.props
101+
Directory.Build.targets = Directory.Build.targets
102+
EndProjectSection
103+
EndProject
104+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.Duplex", "src\System.ServiceModel.Duplex\src\System.ServiceModel.Duplex.csproj", "{1B2CC303-9D61-4A2E-9B9F-BD92294411E9}"
105+
EndProject
106+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.Security", "src\System.ServiceModel.Security\src\System.ServiceModel.Security.csproj", "{DFABBE15-01CF-473A-8BD4-A7F374371E4C}"
107+
EndProject
108+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.Shim", "src\System.ServiceModel.Shim\System.ServiceModel.Shim.csproj", "{1C5A7A17-E06D-4F19-B18B-C5AAE512AF59}"
109+
EndProject
110+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.NetFramingBase.Ref", "src\System.ServiceModel.NetFramingBase\ref\System.ServiceModel.NetFramingBase.Ref.csproj", "{09D0456B-C1C6-40E4-AE8E-64D60189A7B2}"
111+
EndProject
94112
Global
95113
GlobalSection(SolutionConfigurationPlatforms) = preSolution
96114
Debug|Any CPU = Debug|Any CPU
@@ -265,6 +283,30 @@ Global
265283
{FD188537-21AF-48C5-84FF-F8758F4C42A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
266284
{FD188537-21AF-48C5-84FF-F8758F4C42A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
267285
{FD188537-21AF-48C5-84FF-F8758F4C42A8}.Release|Any CPU.Build.0 = Release|Any CPU
286+
{34CCEAC9-43B1-4654-BF2F-0B40EC7AD016}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
287+
{34CCEAC9-43B1-4654-BF2F-0B40EC7AD016}.Debug|Any CPU.Build.0 = Debug|Any CPU
288+
{34CCEAC9-43B1-4654-BF2F-0B40EC7AD016}.Release|Any CPU.ActiveCfg = Release|Any CPU
289+
{34CCEAC9-43B1-4654-BF2F-0B40EC7AD016}.Release|Any CPU.Build.0 = Release|Any CPU
290+
{81843CB2-E128-427B-9920-EEDBBBD4CB0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
291+
{81843CB2-E128-427B-9920-EEDBBBD4CB0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
292+
{81843CB2-E128-427B-9920-EEDBBBD4CB0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
293+
{81843CB2-E128-427B-9920-EEDBBBD4CB0B}.Release|Any CPU.Build.0 = Release|Any CPU
294+
{1B2CC303-9D61-4A2E-9B9F-BD92294411E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
295+
{1B2CC303-9D61-4A2E-9B9F-BD92294411E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
296+
{1B2CC303-9D61-4A2E-9B9F-BD92294411E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
297+
{1B2CC303-9D61-4A2E-9B9F-BD92294411E9}.Release|Any CPU.Build.0 = Release|Any CPU
298+
{DFABBE15-01CF-473A-8BD4-A7F374371E4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
299+
{DFABBE15-01CF-473A-8BD4-A7F374371E4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
300+
{DFABBE15-01CF-473A-8BD4-A7F374371E4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
301+
{DFABBE15-01CF-473A-8BD4-A7F374371E4C}.Release|Any CPU.Build.0 = Release|Any CPU
302+
{1C5A7A17-E06D-4F19-B18B-C5AAE512AF59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
303+
{1C5A7A17-E06D-4F19-B18B-C5AAE512AF59}.Debug|Any CPU.Build.0 = Debug|Any CPU
304+
{1C5A7A17-E06D-4F19-B18B-C5AAE512AF59}.Release|Any CPU.ActiveCfg = Release|Any CPU
305+
{1C5A7A17-E06D-4F19-B18B-C5AAE512AF59}.Release|Any CPU.Build.0 = Release|Any CPU
306+
{09D0456B-C1C6-40E4-AE8E-64D60189A7B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
307+
{09D0456B-C1C6-40E4-AE8E-64D60189A7B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
308+
{09D0456B-C1C6-40E4-AE8E-64D60189A7B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
309+
{09D0456B-C1C6-40E4-AE8E-64D60189A7B2}.Release|Any CPU.Build.0 = Release|Any CPU
268310
EndGlobalSection
269311
GlobalSection(SolutionProperties) = preSolution
270312
HideSolutionNode = FALSE

eng/FacadeAssemblies.targets

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.DotNet.GenFacades" Version="$(MicrosoftDotNetGenFacadesPackageVersion)" PrivateAssets="All" />
15-
14+
<PackageReference Include="Microsoft.DotNet.GenFacades"
15+
Version="$(MicrosoftDotNetGenFacadesVersion)"
16+
PrivateAssets="all"
17+
IsImplicitlyDefined="true" />
18+
1619
<ContractProjectReference Include="..\ref\$(AssemblyName).Ref.csproj"
1720
Condition="'@(ContractProjectReference)' == '' AND '$(HasReferenceAssembly)' == 'true'" />
1821
</ItemGroup>

eng/GenRefAssembly.targets

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<PropertyGroup>
4+
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
5+
<GenAPIGenerateReferenceAssemblySource Condition="'$(GenAPIGenerateReferenceAssemblySource)' == ''">true</GenAPIGenerateReferenceAssemblySource>
6+
<GenAPITargetPath>..\ref\$(AssemblyName).cs</GenAPITargetPath>
7+
<RefAssemblyProjectReference>$(MSBuildProjectDirectory)\..\ref\$(AssemblyName).Ref.csproj</RefAssemblyProjectReference>
8+
<RefAssemblyProjectReference>$([System.IO.Path]::GetFullPath($(RefAssemblyProjectReference)))</RefAssemblyProjectReference>
9+
<GenAPIExcludeApiList Condition="Exists('ReferenceAssemblyExclusions.txt')">ReferenceAssemblyExclusions.txt</GenAPIExcludeApiList>
10+
<!-- <RefAssemblyProjectReference Condition="'$(RefAssemblyProjectReference)' == '' AND '$(HasReferenceAssembly)' == 'true'">$([System.IO.Path]::GetFullPath($(MSBuildProjectDirectory)\..\ref\$(AssemblyName).Ref.csproj)</RefAssemblyProjectReference> -->
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<None Include="ReferenceAssemblyExclusions.txt" Condition="Exists('ReferenceAssemblyExclusions.txt')" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<PackageReference Include="Microsoft.DotNet.GenAPI"
19+
version="$(MicrosoftDotNetGenApiPackageVersion)"
20+
PrivateAssets="all"
21+
IsImplicitlyDefined="true"/>
22+
<ProjectReference Include="$(RefAssemblyProjectReference)">
23+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
24+
<OutputItemType>ResolvedReferenceAssemblyReference</OutputItemType>
25+
</ProjectReference>
26+
</ItemGroup>
27+
28+
<PropertyGroup Condition="'$(HasReferenceAssembly)' == 'true'">
29+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddReferenceAssemblyToPackage</TargetsForTfmSpecificContentInPackage>
30+
</PropertyGroup>
31+
32+
<Target Name="AddReferenceAssemblyToPackage" AfterTargets="AssignTargetPaths">
33+
<ItemGroup>
34+
<TfmSpecificPackageFile Include="@(ResolvedReferenceAssemblyReference)" PackagePath="ref/$(TargetFramework)" />
35+
</ItemGroup>
36+
</Target>
37+
</Project>

eng/ReferenceAssembly.targets

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<ItemGroup Condition="'$(TargetFramework)' == '$(NetFrameworkVersion)'">
4+
<None Include="@(Compile)" />
5+
<Compile Remove="@(Compile)" />
6+
<Reference Include="System" />
7+
<Reference Include="System.IdentityModel" />
8+
<Reference Include="System.Runtime.Serialization" />
9+
<Reference Include="System.ServiceModel" />
10+
<Reference Include="System.Xml" />
11+
</ItemGroup>
12+
13+
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(EnableDefaultCompileItems)' != 'false'">
14+
<ProjectReference Include="..\..\System.ServiceModel.Primitives\ref\System.ServiceModel.Primitives.Ref.csproj" />
15+
</ItemGroup>
16+
17+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' and Exists('netstandard.cs')">
18+
<None Include="@(Compile)" />
19+
<Compile Remove="@(Compile)" />
20+
<None Condition="Exists('netstandard.cs')" Remove="netstandard.cs" />
21+
<Compile Condition="Exists('netstandard.cs')" Include="netstandard.cs" />
22+
</ItemGroup>
23+
24+
<ItemGroup Condition="'$(TargetFramework)' == '$(DotNetVersion)' and '$(EnableDefaultCompileItems)' != 'false'">
25+
<None Include="@(Compile)" />
26+
<Compile Remove="@(Compile)" />
27+
<None Condition="Exists('$(AssemblyName).cs')" Remove="$(AssemblyName).cs" />
28+
<Compile Condition="Exists('$(AssemblyName).cs')" Include="$(AssemblyName).cs" />
29+
</ItemGroup>
30+
</Project>

eng/RuntimePackages.props

Whitespace-only changes.

eng/RuntimePackages.targets

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<ItemGroup Condition="'$(IncludeSRCommonCode)' != 'false' and '$(IsReferenceAssembly)' != 'true'">
4+
<Compile Include="..\..\Common\src\System\SR.cs">
5+
<Link>Common\System\SR.cs</Link>
6+
</Compile>
7+
</ItemGroup>
8+
9+
<ItemGroup Condition="'$(TargetFramework)' == '$(NetFrameworkVersion)'">
10+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" IsImplicitlyDefined="true" />
11+
<Reference Include="System" />
12+
<Reference Include="System.IdentityModel" />
13+
<Reference Include="System.Runtime.Serialization" />
14+
<Reference Include="System.ServiceModel" />
15+
<Reference Include="System.Xml" />
16+
</ItemGroup>
17+
18+
<ItemGroup Condition="'$(TargetFramework)' == '$(NetFrameworkVersion)' and Exists('NetFxTypeForwards.cs')">
19+
<None Include="@(Compile)" />
20+
<Compile Remove="@(Compile)" />
21+
<None Include="@(EmbeddedResource)" />
22+
<EmbeddedResource Remove="@(EmbeddedResource)" />
23+
<None Remove="NetFxTypeForwards.cs" />
24+
<Compile Include="NetFxTypeForwards.cs" />
25+
</ItemGroup>
26+
27+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' and Exists('netstandard.cs')">
28+
<None Include="@(Compile)" />
29+
<Compile Remove="@(Compile)" />
30+
<None Include="@(EmbeddedResource)" />
31+
<EmbeddedResource Remove="@(EmbeddedResource)" />
32+
<None Remove="netstandard.cs" />
33+
<Compile Include="netstandard.cs" />
34+
</ItemGroup>
35+
36+
<ItemGroup Condition="'$(TargetFramework)' == '$(DotNetVersion)'">
37+
<Compile Condition="Exists('netstandard.cs')" Remove="netstandard.cs" />
38+
<Compile Condition="Exists('NetFxTypeForwards.cs')" Remove="NetFxTypeForwards.cs" />
39+
<None Condition="Exists('netstandard.cs')" Include="netstandard.cs" />
40+
<None Condition="Exists('NetFxTypeForwards.cs')" Include="NetFxTypeForwards.cs" />
41+
</ItemGroup>
42+
43+
<PropertyGroup>
44+
<!-- Placeholders don't need a dependency group. -->
45+
<NoWarn>$(NoWarn);NU5128;NU5131</NoWarn>
46+
</PropertyGroup>
47+
<ItemGroup>
48+
<None Include="$(PlaceholderFile)"
49+
Pack="true"
50+
PackagePath="ref\netcoreapp2.0\;
51+
$(BuildOutputTargetFolder)\MonoAndroid10\;
52+
$(BuildOutputTargetFolder)\MonoTouch10\;
53+
$(BuildOutputTargetFolder)\xamarinios10\;
54+
$(BuildOutputTargetFolder)\xamarinmac20\;
55+
$(BuildOutputTargetFolder)\xamarintvos10\;
56+
$(BuildOutputTargetFolder)\xamarinwatchos10\"
57+
Condition="$(TargetFrameworks.Contains('netstandard2.'))" />
58+
</ItemGroup>
59+
</Project>

eng/Version.Details.xml

+4
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,9 @@
1616
<Uri>https://github.com/dotnet/arcade</Uri>
1717
<Sha>39290b60a9015b444a1762d67e26f0f187eb5cc2</Sha>
1818
</Dependency>
19+
<Dependency Name="Microsoft.DotNet.GenAPI" Version="10.0.0-beta.24557.1">
20+
<Uri>https://github.com/dotnet/arcade</Uri>
21+
<Sha>39290b60a9015b444a1762d67e26f0f187eb5cc2</Sha>
22+
</Dependency>
1923
</ToolsetDependencies>
2024
</Dependencies>

0 commit comments

Comments
 (0)