Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TargetFramework logic insufficient for .NET 5 #4387

Closed
sfoslund opened this issue Oct 7, 2020 · 10 comments
Closed

TargetFramework logic insufficient for .NET 5 #4387

sfoslund opened this issue Oct 7, 2020 · 10 comments

Comments

@sfoslund
Copy link
Member

sfoslund commented Oct 7, 2020

With .NET 5 we are introducing a new style of target framework that includes target platform information (for example, net5.0-windows). This repo contains logic that will break with these new target framework and duplicated target framework logic.

Details:

@sfoslund
Copy link
Member Author

sfoslund commented Oct 9, 2020

cc @mconnew

@HongGit HongGit self-assigned this Oct 15, 2020
@HongGit HongGit added this to the 5.0 milestone Oct 15, 2020
@HongGit
Copy link
Contributor

HongGit commented Oct 16, 2020

This is probably fine because WCF has not been updated to .NET 5.0, we are still staying on .NET 3.0.

@HongGit HongGit modified the milestones: 5.0, 6.0 Oct 16, 2020
@Doomblaster
Copy link

it definetly doesn't work
image

Even setting --targetFramework doesn't work
image

Problem is that it picks the targetframework moniker from csproj file regardless it seems. Doing the same outside of the project works, but something is not right here
image

@HongGit HongGit modified the milestones: 6.0, dotnet-svcutil 2.0.3 Jun 23, 2021
@HongGit
Copy link
Contributor

HongGit commented Jun 23, 2021

@imcarolwang can you please take a look at this issue?

@akoeplinger
Copy link
Member

This also impacts the new .NET6 based Xamarin projects which use net6.0-android and net6.0-ios TFMs.

A workaround is to temporarily change the TFM in the project to net6.0, run dotnet-svcutil and then change it back.

@HongGit
Copy link
Contributor

HongGit commented Jun 24, 2022

@imcarolwang, can you please verify whether these new versions are already included?

@imcarolwang
Copy link
Contributor

In PR #4650 we added support of net5.0-* and net6.0-* targets, the code has been merged so the next release of dotnet-svcutil and WCF Connected Service tool should support project types such as net6.0-android , net6.0-ios, net6.0-windows.

@akoeplinger
Copy link
Member

@imcarolwang the code hardcodes net5.0 and net6.0 though so it'll break again on net7.0:

if (tfx.Length > 1 && (tfx[0] == "net5.0" || tfx[0] == "net6.0"))

@imcarolwang
Copy link
Contributor

@imcarolwang the code hardcodes net5.0 and net6.0 though so it'll break again on net7.0:

if (tfx.Length > 1 && (tfx[0] == "net5.0" || tfx[0] == "net6.0"))

Address in PR #4893 which is under review.

@imcarolwang
Copy link
Contributor

Fix is in and released to dotnet-svcutil version 2.1.0. Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants