dotnet / dotnet/wpf

Make Desktop WPF use Core WPF targets and tasks (MarkupCompile)

Open
#10,600 2 comments 3 reactions 0 assignees View on GitHub
area-NetSDK needs team triage
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

Currently when you build a WPF application for `net472` and use legacy WPF, it imports `C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Xaml.targets`:

![image](https://github.com/dotnet/wpf/assets/679326/70010173-615e-4551-8e7c-4b1e18e4e311)

The targets are legacy and haven't been updated. For example, GenerateTemporaryTargetAssembly task doesn't have the latest properties:

![image](https://github.com/dotnet/wpf/assets/679326/7b45b602-136e-4020-bd38-4c1ce93488e4)

We need to stop relying on things from C:\Windows, for hermetic and isolated builds. Moving to the same targets and tasks in the SDK instead ensures portability (you could build WPF desktop projects on Mac, for example) and future-proofs them.

Bonus: see if it's possible to use the new WPF assemblies for `net472` desktop applications, instead of the ones shipping in .NET Framework. If possible, this would allow to prepare WPF apps for moving to .NET Core.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.