The package is a .NET application, so it will work on a computer without .NET.

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

I know that there are many questions on the same topic in StackOverflow. Here are some of them from which I read the answers to everyone:

Packing .net infrastructure with deployment of .net applications

Run .net application without installing .net client profile

Run a Windows C # application on Windows XP without installing the .NET Framework

Thus, all the answers to the above questions indicate that this is not possible without special software, etc. One of the programs mentioned was Salamander.NET Linker . The only problem is that I cannot start the application after it has been processed by Salamender. I understand that this in itself is impossible, since this requires starting the .NET virtual machine. However, in the past I made Java applications and with them sent the whole JVM. Surprisingly, they still worked. So the reason this is not a duplicate of the above questions is because my true question is:

What elements of the .NET platform will I need to pack? If I manage to pack everything by placing them in the same directory as the application that I run, allows the application to start?

I found one solution for this, the Microsoft.NET Redist package . The only problem is that it has its own graphical interface. Also, that would be perfect. So, can anyone tell me one of two things:

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

If this does not happen, or it would be impractical, approximately, what directories will I need to copy from the .NET installations?

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

If, in the absence of another solution, I used Dependency Walker to check all the dependencies of my program. If I packed most of them, would my application theoretically work?

+8
c #
source share
3 answers

For .NET, you really should just install the appropriate .NET platform. Installing the .NET Framework includes command-line options that allow you to use the installation without sound, for example:

dotnetfx35.exe /q /norestart 

For more information about command line options, see the options for 3.5 and .NET 4.0 .

However, most installation packages will process this data for you as part of the installation. Using a decent installer will automatically take care of this dependency.

+12
source share

Depending on the parts of the .NET Framework, you need to use Mono . It supports the delivery of the runtime without installation, just like the JVM, or you can statically link to binaries to create your own executable.

+8
source share

If you plan to deploy your application (and assuming that the installation process should not be too complicated), you can simply create a Setup project in Visual Studio , and then download the prerequisites (.NET platform and other materials that you think you may be needed).

You can follow the steps described in these MSDN articles:

For a walkthrough, see this CodeProject article .

For more complex deployment scenarios (for example, installing device drivers for your application or better localization support), I would recommend looking at the WiX (Windows Installer XML) toolkit . This is a toolkit that creates Windows installation packages that you customize using XML files inside Visual Studio. WiX also supports various download scenarios.

This page describes the differences between VS Setup, WiX, and InstallShield projects.

+2
source share

All Articles