Skip to content

Multi-targeting WinUI and WPF on Windows 10 with Windows Runtime API #11472

Answered by zivkan
newky2k asked this question in Q&A
Discussion options

You must be logged in to vote

Firstly there isn't a way of specifing a different library for WPF and WinUI for the same TFM and if i include both 'UseWPF' and 'UseWinUI' that it will include framework references that are not needed.

If the only thing you want is for NuGet to not force the consuming project to add <FrameworkReference ... />, with the knowledge that when the consuming project is using WPF or WinUI, that the project will have it anyway, then I suggest creating a Feature Request, asking for a pack to use a SupressFrameworkReferences property, or similar, to work similar to how SuppressDependenciesWhenPacking and IncludeBuildOutput work. Note, this still means that you'll have a single assembly per uniqu…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@newky2k
Comment options

Answer selected by newky2k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants