Compiling C# + WPF on Linux in order to run on Windows

天涯浪子 提交于 2020-01-03 15:12:08

问题


I have a C# application of which some parts are written using WPF (which is not supported by Mono). Is it possible to compile this application on Linux? Ultimately, the application will run on Windows, but it is part of a larger framework and our entire build process runs on Linux, so I would like to be able to compile the C# application on Linux as well.


回答1:


Mono does not, and currently has no plans to support WPF, and by proxy, XAML. Where you might get a break with a subset of XAML is with Silverlight support via Moonlight. See http://www.mono-project.com/WPF for details.




回答2:


This is definitely not possible, Mono lacks the build step that will compile your XAML to a binary format and embed it




回答3:


I think the answer is NO for the moment.

The same question was asked here:

http://www.c-sharpcorner.com/UploadFile/kirtan007/1516/Default.aspx

Look at the last answer in this thread (a little bit of hope):

http://www.daniweb.com/forums/thread161098.html




回答4:


I agree with the other answers, natively this doesn't seem possible.

If you have the appropriate licenses already you could look into running VMWare or Virtualbox to build it. Obviously memory usage and time requirements for the build will go up, it all depends on how much it matters to you that you can run it all on one box. I believe both support scripting.



来源:https://stackoverflow.com/questions/3580000/compiling-c-sharp-wpf-on-linux-in-order-to-run-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!