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

NETSDK1137 should occur even when targeting .NET Core 3.x or .NET Framework #45833

Open
na1307 opened this issue Jan 9, 2025 · 0 comments
Open
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@na1307
Copy link

na1307 commented Jan 9, 2025

https://github.com/dotnet/sdk/blob/main/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L1444-L1451

According to this code, WindowsDesktop will be loaded not only when targeting .NET 5 or higher, but also when targeting .NET Core 3.x or .NET Framework. So you don't need to use Microsoft.NET.Sdk.WindowsDesktop no matter which framework you target.

https://github.com/dotnet/sdk/blob/main/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets#L145-L149

However, the current behavior only raises a warning when targeting .NET 5 or later. I think this warning should be raised regardless of which framework is targeted.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

1 participant