command-line-api icon indicating copy to clipboard operation
command-line-api copied to clipboard

Update projects to net7.0 TargetFramework with shared property

Open lbussell opened this issue 3 years ago • 1 comments

Fixes https://github.com/dotnet/command-line-api/issues/1792

From that issue:

Source build requires projects to build with the current TFM or a supported netstandard TFM. command-line-api currently targets net6.0. Ideally this would be updated to net7.0. If that is not possible, the TFM could be conditioned for source-build but ideally the regular and source build would be identical.

lbussell avatar Jul 19 '22 21:07 lbussell

I'm seeing this error when testing locally:

/home/logan/vcs/command-line-api/src/System.CommandLine/Binding/ArgumentConverter.DefaultValues.cs(34,20): error IL2070: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Type.GetConstructor(Type[])'. The parameter 'listType' of method 'System.CommandLine.Binding.ArgumentConverter.CreateEmptyList(Type)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to. [/home/logan/vcs/command-line-api/src/System.CommandLine/System.CommandLine.csproj]

Not sure what to change to fix this.

cc @jonsequitur

lbussell avatar Jul 19 '22 21:07 lbussell

@jonsequitur - this is ready for a final review.

MichaelSimons avatar Aug 26 '22 19:08 MichaelSimons

@jonsequitur, @brettfo, will these changes flow into SDK and eventually installer/release/7.0.1xx? It's been a while since this was merged and usually changes flow by then. If not, then where do I need to backport this change to?

lbussell avatar Sep 20 '22 22:09 lbussell

Ping @jonsequitur, @brettfo.

MichaelSimons avatar Sep 27 '22 15:09 MichaelSimons

Hi, we set up a darc feed for you https://github.com/dotnet/sdk/pull/28410

nagilson avatar Oct 07 '22 23:10 nagilson