-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Enable Importing Framework's WinFX Targets By Default While Allowing Opt-Out #12764
Enable Importing Framework's WinFX Targets By Default While Allowing Opt-Out #12764
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think we should ever import these by default if targeting .NET Core. If I'm understanding the regressions correctly, they are all for projects that target .NET Framework. Does that make sense?
@benvillalobos This is already allowing opt-out. We could remove the entire section in the SDK and replace it with changes from dotnet/msbuild#5425 and dotnet/wpf#2976. This will surely fix a host of problems down the road. Having this specified in multiple places creates confusion and more regressions. I propose we move them to MSBuild and the Desktop SDK targets (i.e. near to where the WinFX targets are actually imported). @dsplaisted @rainersigwald Can we reopen (dotnet/msbuild#5425) and discuss this? |
Unless I'm missing something: the Desktop SDK targets are for using WinFX (WPF) on top of .NET Core / .NET 5. This issue, however, affects apps that are on .NET Framework, but use Sdk-style projects, e.g. with the |
The .NET SDK Extras already uses Desktop SDK props/targets if it is present. So, it'll be a cascading effect, if we fix them in MSBuild/WindowsDesktop SDKs. |
#12786 updates the logic from this PR. |
Should fix #12324.
We're running into MANY cases where disabling the default-import of framework's
winfx.targets
is breaking internal partners. This PR reverses that behavior.Now it imports framework
winfx.targets
by default (as this seems to be the normal case), while allowing for "opt-out" of this behavior by settingImportFrameworkWinFXTargets
to false.