1

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!

8
  • 4
    I assume you mean .NET 2.0 instead of .NET 1.1? Did you already have a look at the .NET 3.5 client profile? It includes a reduced set of assemblies which are typically needed for client (WPF-)applications: blogs.windowsclient.net/trickster92/archive/2008/05/21/… Commented Mar 27, 2010 at 14:08
  • @divo: Janusz probably does mean .NET 1.1, since it's (slightly) more ubiquitous than 2.0, which still has a 23 MB installer. Commented Mar 27, 2010 at 14:12
  • @MusiGenesis: I don't think so. It's been a long time I have seen a machine without .NET 2.0 installed. .NET 2.0 comes with WinXP SP3, Vista and Win7 (where 3.5 SP1 is included), whereas .NET 1.1 never has been included in any Windows version. Commented Mar 27, 2010 at 14:21
  • @divo: the .NET Framework 1.1 was included in Windows Server 2003 Commented Mar 27, 2010 at 14:24
  • 1
    Janusz needs to target .NET 1.0 instead of 1.1, or he'll miss out on the 4 customers who are stuck on 1.0. Commented Mar 27, 2010 at 14:45

4 Answers 4

6

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.

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

2 Comments

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.
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/2 I will experiment with .net client profile and will check new version as well.
1

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.

Comments

1

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).

4 Comments

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.
If the sun weren't shining, I might contest your use of the word "easily" here. :)
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.
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.
0

Did you try the Client only framework subset? You just check a box in your project setup and it will use a slimmed down 26 mb version of .net 3.5. It is also known as Client Profile
(source: msdn.com)

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.