I am required to create a simple application. Since I am good at WPF and I don't know win forms that good I implemented my application by creating a .Net Framework 4.0 WPF project in Visual Studio. Everything works great the application runs like it is supposed to.

Since the application is required to run in multiple platforms (Windows XP and above) I am including the prerequisites when publishing my applications. The prerequisites happen to be:

  • 1) WIC (Windows Imaging Component) old computers need that to run the .net framework 4.0
  • 2) Windows installer 3.1 (needed in order to install the next prerequisite)
  • 3) Windows .NET Framework 4.0 Client Profile

If I install those prerequisites then the application runs like it is supposed to.

Now the problem is:

My boss did not approve my application because he tried installing it in a Windows XP machine with SP2 and this are the things that happened:

Step 1)

// first prerequisite (WIC) took less than 1 minute to install everything
// is working great so far.

Step 2)

// second prerequisite (Windows Installer 3.1) takes about 2 minutes to install
// which is great. After the installation is done the computer needs to be  
// restarted in order to continue with the installation. Things are not going 
// that good now but we are still ok...

Step 3)

// After the computer is done rebooting it continues with the last prerequisite 
// (Windows .NET Framework 4.0 Client Profile). That takes 10 minutes to install!!!!

Step 4)

// My application has all the prerequisites needed to be installed so it installs in
// about 1 minute

We recorded the time, and the application took about 25 minutes to install from start to finish. The computer where we tested the installation was a virtual computer using 2 cores and 1 GB of memory with 3.1 GHZ.


What do you guys recommend in order to speed up this installation? Should I use a different technology such as windows forms using .net 2.0? It will be nice if I can deploy the application that I have already created. If you guys could help me make this application portable I will really appreciate it. In order to do so I tried building my application with all the required references copied to the output directory. That did not work... Or any ideas of how to make the installation be faster will be of great help as well.

有帮助吗?

解决方案

If you're using .NET Framework 4.0 (which is not going to come out-of-the-box with any versions of Windows, especially Windows XP) there's no way to get around the install of .NET 4.0 on the target machine. Your major bottleneck is going to be the download of .NET 4.0 files from Microsoft to the machine.

I've run into similar problems where the initial install of an application takes forever because of the .NET 4.0 download and install. We even encountered an issue where the application couldn't be install because there was insufficient disk space for the download.

One option would be to pre-push the prereqs out to all the machines you'll be install this on before deploying your application.

Otherwise, you might be forced to use an older version of the .NET framework. Here's a list of the framework versions which shipped with various versions of windows.

http://blogs.msdn.com/b/astebner/archive/2007/03/14/mailbag-what-version-of-the-net-framework-is-included-in-what-version-of-the-os.aspx

Unfortunately, if your organization is committed to using a 10 year old operating system then they either need to accept that modern tools will require a lengthy install process while all prereqs are loaded... or else force you to use a 10 year old software technolgy.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top