3

Ok, so read my question before you respond. I have a c# project that I need to compile on linux that contains WPF. I don't need to run WPF on linux, just need to compile. WPF is essentially just .net DLL's, so you think this would be doable since I'm NOT trying to run the app on linux, just build it. As far as I know I can't do this with mono compile, but I may be wrong. Maybe I can use the Microsoft compiler somehow? I don't know.

Any ideas on how I could JUST BUILD a C# app on Linux(again, I don't need to run it).

6
  • 1
    Lol why is there always some dude that rolls through and downvotes questions. Commented Mar 26, 2012 at 1:02
  • Automated build process. Have a team and we are working with nant to create an automated build process for nightly's and releases. Why would you ask why I would want to compile from the command line? Windows severs are more expensive. Commented Mar 26, 2012 at 1:11
  • @sarnold if it's possible to use mono to build c# apps that have wpf, that's an answer, from all I read it said it wasn't possible. If it is, then that's an answer that I'd accept(I'm running the latest mono). Commented Mar 26, 2012 at 1:19
  • It is possible theoretically by mocking assemblies... But I should try to implement it this evening... Commented Mar 26, 2012 at 9:24
  • In my experience, if you're doing Windows development and try to save money by not using Windows, you'll waste a lot more money on the extra time and effort it takes you to get things to work. Just use a Windows box for your automated builds. Commented Mar 28, 2012 at 0:02

2 Answers 2

1

It isn't possible: http://www.mono-project.com/WPF

Sign up to request clarification or add additional context in comments.

3 Comments

To summarize, WPF is a huge API, and as yet no one is willing to implement.
I'm not trying to run WPF, just to compile. Heard there was a way using some MSIL and mono or something?
I started the project I am working on in Linux, Mono is the only set of libraries for .NET that I could find. You can't build the application without the libraries. Since WPF isn't implemented for Linux, you don't have the libraries. That and a few other reasons is why I moved my project to Windows and Visual Studio. Finally, this question was asked and answered here quite some time ago: stackoverflow.com/questions/3580000/…
1

I have tried the simplest solution I could imagine: copy the Microsoft versions of the required assemblies (like PresentationCore.dll and PresentationFramework.dll) to a Linux box and build a simple WPF application using them.

This didn't work. I got lots of warnings about various assemblies like:

Reference 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' not resolved
Found a conflict between : 'System' and 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'System' reference.

And there was the error:

CS0584: Internal compiler error: Could not import type `System.Windows.Window' from `PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

There was also one other error, but it's probably just a consequence of this error.

Based on this, I think building WPF applications using mono will not be simple, if possible at all.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.