Skip to content

Commit

Permalink
Add net6.0 support for dotnet-svcutil and update tests. (#4772)
Browse files Browse the repository at this point in the history
* Add net6.0 support for dotnet-svcutil and update tests.

* Remove support of netcoreapp2.1 from dotnet-svcutil.
  • Loading branch information
imcarolwang authored Jan 28, 2022
1 parent 41d8d34 commit cf32e7d
Show file tree
Hide file tree
Showing 102 changed files with 1,759 additions and 329 deletions.
22 changes: 13 additions & 9 deletions src/dotnet-svcutil/lib/src/Bootstrapper/SvcutilBootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,20 @@ internal async Task GenerateProjectAsync(bool keepBootstrapperDir, ILogger logge
this.MSBuildProj = await MSBuildProj.DotNetNewAsync(projectFullPath, logger, cancellationToken).ConfigureAwait(false);
this.MSBuildProj.AddDependency(svcutilPkgRef);

// Comment out code below for reasons: 1. it never used for .net core later than V2.1 since when the approach is always use TF from the generated project.
// 2. with below code applied when target framework is netstandard2.0 client machine require netcoreapp2.0 (obsolete) for bootstrapper to work
// 3. keep it here for future reference in case when we need definite bootstrapper TF version

// NOTE: If post v2.0 NetStandard ships a different version from NetCore the table below needs to be updated!
var targetFramework = frameworkInfo.FullName;
if (isSupportedTFM && frameworkInfo.IsKnownDnx)
{
if (frameworkInfo.Name == FrameworkInfo.Netstandard)
{
targetFramework = FrameworkInfo.Netcoreapp + TargetFrameworkHelper.NetStandardToNetCoreVersionMap[frameworkInfo.Version];
}
this.MSBuildProj.TargetFramework = targetFramework;
}
//var targetFramework = frameworkInfo.FullName;
//if (isSupportedTFM && frameworkInfo.IsKnownDnx)
//{
// if (frameworkInfo.Name == FrameworkInfo.Netstandard)
// {
// targetFramework = FrameworkInfo.Netcoreapp + TargetFrameworkHelper.NetStandardToNetCoreVersionMap[frameworkInfo.Version];
// }
// this.MSBuildProj.TargetFramework = targetFramework;
//}
// else
// The TFM is unknown: either, it was not provided or it is a version not yet known to the tool,
// we will use the default TF from the generated project.
Expand Down
9 changes: 9 additions & 0 deletions src/dotnet-svcutil/lib/src/Shared/TargetFrameworkHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ internal class TargetFrameworkHelper
ProjectDependency.FromPackage("System.ServiceModel.Http", "4.8.*" ),
ProjectDependency.FromPackage("System.ServiceModel.NetTcp", "4.8.*" ),
ProjectDependency.FromPackage("System.ServiceModel.Security", "4.8.*"),
ProjectDependency.FromPackage("System.ServiceModel.Federation", "4.8.*")
} },
{new Version("6.0"), new List<ProjectDependency> {
ProjectDependency.FromPackage("System.ServiceModel.Duplex", "4.9.*" ),
ProjectDependency.FromPackage("System.ServiceModel.Http", "4.9.*" ),
ProjectDependency.FromPackage("System.ServiceModel.NetTcp", "4.9.*" ),
ProjectDependency.FromPackage("System.ServiceModel.Security", "4.9.*"),
ProjectDependency.FromPackage("System.ServiceModel.Federation", "4.9.*")
} }
};

Expand All @@ -81,6 +89,7 @@ internal class TargetFrameworkHelper
ProjectDependency.FromPackage("System.Private.ServiceModel", "*"),
ProjectDependency.FromPackage("System.ServiceModel.Security", "*"),
ProjectDependency.FromPackage("System.Xml.XmlSerializer", "*"),
ProjectDependency.FromPackage("System.ServiceModel.Federation", "*")
};

public static Version MinSupportedNetFxVersion { get; } = new Version("4.5");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<PackageReference Include="dotnet-svcutil-lib" Version="99.99.99" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
<TargetFramework>N.N</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Duplex" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.8.*" />
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
</ItemGroup>
</Project>
Loading

0 comments on commit cf32e7d

Please sign in to comment.