2

My programming language is C# .Net 3.5 and I may have to install my applications in very old client systems (windows XP-SP1 and above) and may be that those systems do not contain any version of .Net (or even Windows-Installer-3.1) in them. I have worked on VS-2008 deployment projects on and off since some time and I have some working knowledge of it. I want to write a deployment project in VS-2008 but I have 2 questions :

  1. Can a VS-2008 deployment project containing pre-requisites run on a system without any version of .Net (or even Windows-Installer-3.1) pre-installed in the system ?
  2. How to create a boot-strapper installer to run in systems without .net pre-installed in them (boot strapper will install all pre-requisites including .net and other 3rd party run times) ?

Regards

Akshay Mishra

AkshayM
  • 317
  • 6
  • 18
  • 1
    possible duplicate of [create setup project that includes .Net Framework 3.5 SP1](http://stackoverflow.com/questions/626525/create-setup-project-that-includes-net-framework-3-5-sp1) – V4Vendetta Mar 19 '12 at 05:56
  • possible duplicate of http://stackoverflow.com/questions/45702/is-there-some-way-to-compile-a-net-application-to-native-code – Habib Mar 19 '12 at 05:57

4 Answers4

1

Can a VS-2008 deployment project containing pre-requisites run on a system without any version of .Net (or even Windows-Installer-3.1) pre-installed in the system ?

Yes, the EXE bootstrapper which handles prerequisites doesn't have any dependencies. So you can safely add Windows Installer and .NET Framework as prerequisites in your setup project.

How to create a boot-strapper installer to run in systems without .net pre-installed in them (boot strapper will install all pre-requisites including .net and other 3rd party run times) ?

Here is an article which may help: http://setupanddeployment.com/uncategorized/custom-prerequisite-visual-studio-setup-file/

Cosmin
  • 21,216
  • 5
  • 45
  • 60
0

You can use Salamander .net linker. I don't exactly understand what it does but what I know is that I was able to pack the necessary reference and the program into 1 folder. When I move the folder to a computer without .net framework installed, it was able to run.

The demo version of the program will give u nag screens every time u run the packed program.

The side effect of doing it this way is my program file size increased from few KB to 40MB.

Other references ..just for information:

http://www.codeproject.com/Articles/321269/Analyzing-a-Net-executable-or-DLL-without-NET-inst http://www.codeproject.com/Questions/157853/Running-the-c-exe-without-net-framework-on-machine

SmartestVEGA
  • 8,415
  • 26
  • 86
  • 139
-1

You need to have .Net version installed on the client system. Else it wont works. Because even to start your application your application will search for CLR 2008 version.

You can do one thing. If you dont want to install .Net Framework, please develop your application in lower version of .Net framework.(May be .Net 2.0 will work without any requirement since it is XP SP1)

Kishore Kumar
  • 12,675
  • 27
  • 97
  • 154
-1

No, because there are not just DLLs, there is common language runtime needed to execute your program. Read the great book by Richter to better understand what happens when you create a program using .net libraries and its lifecycle.
By the way, i'm not quite sure, there must be some older version of .net installed with SP1. So may be you consider changing your application to use .NET 2?
UPDATE
May be you want to add .NET to your setup as prerequisite? You can add them without creating bootstrapper packages. See the article: http://www.codeproject.com/Articles/35976/Add-Prerequisites-of-NET-Framework-in-Visual-Studi

0x49D1
  • 8,505
  • 11
  • 76
  • 127