-
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
Visual Studio and MSBuild net4x TFM builds use legacy PresentationBuildTasks.dll when using WindowsDesktop SDK #1998
Comments
I think the description here should be "When building WPF projects targeting .NET Framework using the WindowsDesktop SDK", correct? |
Yes, that’s it. |
@nguerrera I was right the first time around. This applies to all TFM's - not just netfx TFM's. I just verified it experimentally. I don't know why I emphasized When building in MSBuild, .NET Framework's copy of WinFX.targets comes into play, which muddies the waters, along with the unexpected 'first one wins' behavior of |
I don't know how that could be because desktop PresentationBuildTasks.dll doesn't work targeting core. Checking. |
My understanding was that the .NETFramework Microsoft.WinFX.targets would not be imported in a Core project. |
It looks to me that in fact you do have to target .NET Framework to see the issue. |
This import doesn't happen when targeting core: |
Therefore, neither does this that would be under that: Therefore, there is nothing to override and the UsingTasks in the SDK work as expected when targeting core. |
If you ever try to build for core using in-box netfx PBT, it will fail: I hacked it now to do so and you get this:
If this bug were impacting projects targeting core, we'd be unable to build them in VS, which uses full msbuild. |
You're right - I had a corrupt installation of 3.0.100 on one of my test machines that mislead me... sorry about the confusion. I went back and rechecked this and my observations agree with your predictions/observations. Thanks! |
Although I would love to fix this in 3.0 servicing, I think on second thoughts not. This is unfortunately similar to #1915, for which we have a case for fixing in 3.0 servicing, but absent a clear plan to insert .NET Core 3.0.x SDK servicing update into VS 16.3.x update, there is not much value in making this fix - there is no effective path to deliver this fix to .NET 3.0 customers. We'll just have to deliver this to customers via .NET Core 3.1. I'm going to just fix this in 3.1 and leave 3.0 as-is. /cc @nguerrera, @ryalanms, @rladuca |
When building WPF projects targeting net4x TFM and using the WindowsDesktop SDK in Visual Studio or MSBuild, legacy
PresentationBuildTasks.dll
(i.e, the one that shipped with .NET Framework, and installed in GAC) is used for Markup Compilation.This behavior is wrong - and not what is intended. The correct behavior is to use the copy of PresentationBuildTasks.dll that ships with the .NET Core SDK under
3.0.100\SDKs\Microsoft.NET.Sdk.WindowsDesktop\tools\net472\PresentationBuildTasks.dll
Repro:
The text was updated successfully, but these errors were encountered: