Wednesday, January 20, 2010

How to include .net offline installer in setup projects

When we try to install VS.NET Setup project to another computers it requires .net framework installation files to be downloaded from internet. When connection is slow or no connection it's headache.
It's made easy and perfect in VS 2008 without any custom bootstraps. To do follow these easy steps.
Right click on Setup project's name, and click on Properties menu. So you will see following window.



Click Prerequisites button and you'll see this window.


Check required components from the checkbox list, select 2nd radio button named 'Download prerequisites from the same location as my application' and click OK to complete. I offer you check Windows Installer 3.1.

After all rebuild your setup project and you will see DotnetFX35, WindowsInstaller3_1 folders in your output directory(Debug or Release).
When you run setup.exe, it will check WindowsInstaller3.1 and install it if not present; this requires system reboot. After rebood, it will check .net framework and install if not present, and then it will install main application.

That's all folks

No comments: