-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
SDK-style WPF Projects targeting net472 are broken because ImportFrameworkWinFXTargets is false #4515
Comments
so just upgrading the SDK from 5 to 6 will break the build in a very confusing way |
Even if it is set as |
It wasn't set to anything in my codebase, and setting it to true in my Just create a new SDK-style .csproj, target |
This is the line that sets it to false (whereas otherwise it is true for me): |
IIRC WPF SDK was using the SDK’s WinFx props/Targets (it has a props too), PresentationBuildTasks etc even when building NetFx targets. That has been the behavior since sometime in 3.x. NetFx targets do not use NetFx’s copy of targets or tasks. Not sure if the regression implicates this or not but figured I’d put this out there to help with the investigation. See #2075 |
In .NET SDK's I recommend we move the setting to I can go ahead and open a PR on what the team recommends. |
No worries at all, it’s hard not to break MSBuild and we do it all the time. Welcome to the club! And thanks for looking into this. |
@dsplaisted fyi |
Yeah, it made sense to set this to false in WindowsDesktop.props when that was only imported if the project was explicitly using Microsoft.NET.Sdk.WindowsDesktop. But now we always import that props file. You could move it to the WindowsDesktop Sdk.props file, I think that would work in both situations. |
We need to fix this. @Nirmal4G: Are you going to create a PR or should someone from the WPF team get it? Thanks. |
For now, Moving the logic to the |
This PR has regressed building WPF projects that use the SDK-style:
#2976
By default ImportFrameworkWinFXTargets was
true
, but now changes tofalse
, resulting in MarkupCompile not running.FYI @Nirmal4G
The text was updated successfully, but these errors were encountered: