Packaging a .NET Application So It Will Run On A Computer Without .NET

I have been recently trying to deploy a C# application on a computer that does not have .NET installed.

I know that there have been many questions around the same topic here on StackOverflow. Here are a few of them, of which I read the responses to all:

Packaging up the .net framework with a .net application deployment

Run a .net application without installing .net client profile?

Run C# windows application in windows XP without installing .NET Framework

So all of the responses to the above questions state that it is impossible without specific software, etc. One software mentioned was the Salamander .NET Linker. The only problem with that is that I cannot seem to be able to run the application after it has been processed by Salamender. I understand that this in itself is impossible, as it requires the .NET virtual machine to run. However, in the past, I have made Java applications and along with them, I shipped the entire JVM. Surprisingly, they still worked. So the reason why this is not a duplicate of the above questions is because my true question is:

What items of the .NET framework would I need to package? If I do manage to package all, would placing them in the same directory as the application I'm running allow the application to run?

I found one solution to this, the Microsoft .NET Redist Package. The only problem with this is that it has a GUI of its own. Aside from that, it would be a perfect fit. So, could anyone tell me one of two things:

Is there a command-line .NET package, and if so, where do I download it?

If there isn't, or it would be impractical to do so, approximately what directories would I need to copy from the .NET installations?

I understand that these files and directories are system specific, and that my .NET installation may not work on your computer, but if C# is like Java, then this should be achievable. Is it? Size is not a limitation, it does not matter to me whether or not the application and all its files is 1GB, or if it is only 1MB.

If in case there is no other solution, I used Dependency Walker to check all the dependencies of my program. If I were to package most of them, would my application, in theory, work?

Answers


For .NET, you really must just install the appropriate .NET framework. The .NET framework installation does include command line options to allow for silent installs, such as:

dotnetfx35.exe /q /norestart

For details on the command line options, see the options for 3.5 and for .NET 4.0.

That being said, most installation packages will handle these details for you as part of the installation. Using a decent installer will take care of this dependency automatically.


Need Your Help

How to chain views in Django?

python django extension-methods django-views wrapping

I'm implementing James Bennett's excellent django-contact-form but have hit a snag. My contact page not only contains the form, but also additional flat page information.

Is it possible to loop a list of videos?

html video loops

The title pretty much says it all. I have a spot on a webpage that currently plays a video. I'd like to update the page such that I can add a line of code with a reference to a couple files located...