wpf icon indicating copy to clipboard operation
wpf copied to clipboard

Publish System.Xaml as a separate nuget package.

Open kekekeks opened this issue 7 years ago • 18 comments

There is a lot of code in production that uses System.Xaml separetely from WPF on server-side for purposes that aren't related to UI in any way, shape or form. It's worth as a separate package and will be useful right now even without .NET Core 3.0 and working WPF. I believe it could be shipped for netstandard2.0 to make it useful in .NET Standard libraries.

kekekeks avatar Dec 04 '18 17:12 kekekeks

#51

kekekeks avatar Dec 04 '18 17:12 kekekeks

Just FYI: Having System.Xaml as separate package (while it is part of Desktop UI shared framework shipping in the .NET Core platform) brings a set of non-trivial challenges (CoreFX repo had plenty of good & bad experience with them over last few years). CoreFX team and WPF team will work closely together to fully understand all the challenges and additional costs associated with them. That will help us make the best decision if/when/how best to address this ask.

karelz avatar Dec 04 '18 23:12 karelz

I originally thought this is what was supposed to happen here, but since wpf is no open sources i guess that's a different site.

taori avatar Dec 05 '18 23:12 taori

This has been an ask for long time, by many... Please do consider System.Xaml target .netstandard 2.0

WinInsider avatar Dec 06 '18 16:12 WinInsider

There is a lot of code in production that uses System.Xaml separetely from WPF on server-side for purposes that aren't related to UI in any way, shape or form.

I'm curious if someone could list a set of detailed real-world scenarios for this. It might help sell the team on it.

dotMorten avatar Dec 06 '18 18:12 dotMorten

Workflow foundation is an example of non-UI Xaml usage of system.xaml. It is a critical component to allow runtime workflows.

ewinnington avatar Dec 06 '18 22:12 ewinnington

@dotMorten Mostly custom workflow engines. There is also Workflow Foundation open-source attempt: https://github.com/dmetzgar/corewf that would greatly benefit from having System.Xaml as a separate package.

kekekeks avatar Dec 07 '18 09:12 kekekeks

For now Net Core 3.0 was released. Is there any information about this issues?

Kation avatar Sep 25 '19 07:09 Kation

How can I use System.Xaml.dll in .netcore or .net5 ? I need "XmlnsDefinitionAttribute" and “XmlnsPrefixAttribute” 。Thanks。

idea-zone avatar Feb 23 '23 03:02 idea-zone

@idea-zone Reference WPF framework.

Adding the code to your csproj file:

  <PropertyGroup>
    <UseWPF>true</UseWPF>
  </PropertyGroup>

lindexi avatar Feb 23 '23 04:02 lindexi

@idea-zone参考WPF框架。

将代码添加到您的 csproj 文件中:

  <PropertyGroup>
    <UseWPF>true</UseWPF>
  </PropertyGroup>

My project needs to be published to linux. It's will here an error and ask add "-windows" to TargetFramework .

idea-zone avatar Mar 09 '23 06:03 idea-zone

I assume this is not possible to use yet in a .NET 8 console app?

jdom avatar Jan 31 '24 12:01 jdom

pinging this thread again in hopes there's some alternative to use Xaml in a console app (not for UI, but I'm porting an old console app that was using Xaml for configuring a lot of things, and is used by 300+ partner teams)

jdom avatar Jun 19 '25 20:06 jdom

@jdom You can try my version:

System.Xaml.1.0.0.nupkg.zip

And you can find my code in https://github.com/lindexi/lindexi_gd/tree/208e84e84f72e1f6508e0d8d244f8520fac9cb7c/System.Xaml

lindexi avatar Jun 24 '25 00:06 lindexi

Any updates for getting an official standalone System.Xaml package?

jdom avatar Nov 12 '25 13:11 jdom

@jdom Sorry, there are not any updates for getting an official standalone System.Xaml package. But you can use my version: https://github.com/dotnet/wpf/issues/46#issuecomment-2998408338

lindexi avatar Nov 13 '25 00:11 lindexi

Thanks for the offer @lindexi , but it's not viable alternative for our company. There's way too many commits that we'd have to review for us to safely use it. We also have a custom fork of the code and build it ourselves, but it's a tax to maintain it. I was hoping that the owners of this repo would just officially release it.

jdom avatar Nov 13 '25 13:11 jdom

I was hoping that the owners of this repo would just officially release it.

@jdom You will have to wait for a very long time, see https://github.com/dotnet/wpf/discussions/11188

lindexi avatar Nov 13 '25 13:11 lindexi