tags:

views:

334

answers:

4

Hello,

We have created a beautifully designed .NET WPF desktop application. We are installing the application with InnoSetup , and if .NET 3.5 is not present, it automatically installs it. However, the package to download .NET 3.5 is huge and we found out that about 30% of users do not finish instalation due to this.

The obvious solution is to recode everything into .NET 1.1 with Windows Forms but its a major development which would take few weeks. Also, we would then face dilemma if to support both versions (and use innosetup to choose the right one) or just ditch WPF all together.

Is there any easy way how to convert WPF to Windows Forms? Or do we have any alternative options to consider?

Thank you!

+5  A: 

Converting WPF to WinForms is not trivial, there is certainly no automated way, and if you want to go back to .net 1.1 as well you'll lose a whole load of other features like generics etc, so it's not just the UI you'll be changing.

The best solution would be to target the .net client profile instead. It's a much smaller download.

If you can wait a few weeks, the client profile in .net 4.0 has far better offline installation and platform support. See here and here.

Simon P Stevens
3.5 is ~28mb (but it's a web install only - read the links for how this works, it can end up falling back to a full install), 4.0 is a proper redistributeable download and is 30-50mb depending on the platform.
Simon P Stevens
Thanks to all for all your thoughts. Its very helpful. I wasn't aware of .net client profile and this may be something which could improve the download-to-install conversion without pain of redoing app for .NET 1.1/2I will experiment with .net client profile and will check new version as well.
Janusz
+1  A: 

You could use the .NET Client Profile introduced in .NET 3.5 SP1 in order to reduce the size of the download required to run the app on computers without the .NET Framework 3.5 installed.

The .NET Client Profile is about 28 MB in size, as described here.

Also, have a look at this site to determine the smallest, easiest download required to get the .NET Framework on your system.

Enrico Campidoglio
+1  A: 

Since you say "beautifully designed", I'm going to assume that you made extensive use of WPF's UI elements. If this is the case, forget about porting the UI back to WinForms.

The non-UI parts of your program can be back-ported easily (possibly with no changes at all) IFF (if and only if) they don't reference any post-2.0 stuff (like LINQ, for example).

MusiGenesis
Even if they use LINQ, they can be backported easily by using the C# 3.0 compiler to target the 2.0 framework and ship a LINQ implementation (e.g. Mono's) with the application.But yes, all UI code will have to be rewritten for the WinForms port.
Daniel
If the sun weren't shining, I might contest your use of the word "easily" here. :)
MusiGenesis
I actually just had to move an app (not WPF) back from 3.5 to 2.0. It was easier to just strip out the LINQ entirely, as the developer who pushed for its inclusion only used it in place of `for` loops.
MusiGenesis
Its just mainly WPF including animations. I think it would be very difficult to do them without WPF but possibly the benefit of high download-to-install conversion could outweight the benefits of having the application with animations.
Janusz
A: 
jle