Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is possible to deploy a self contained .NET Framework application?

I'm developing a C#.Net application that uses the .Net Framework but I'm having trouble when users are installing the application on their computers. Some of them just don't know how to install the .Net Framework.

I'm searching for a solution to this problem and I found the self contained deployment use in .Net Core applications.

The problem is that my application doesn't use .Net Core, it is a WPF application.

I already search the web and all solutions I find brings me to the .Net Core self contained deployment.

What can be done in order to deploy a "self contained" .Net Framework application?

Thanks in advance.

like image 857
underthevoid Avatar asked Feb 16 '19 03:02

underthevoid


People also ask

How do I publish self contained?

When publishing your app and creating an executable, you can publish the app as self-contained or framework-dependent. Publishing an app as self-contained includes the . NET runtime with the app, and users of the app don't have to worry about installing . NET before running the app.

What is a self contained app in .NET Core?

Self-contained Application Self-contained applications are applications which include . NET Core runtime when we publish it. It can run on a machine which does not have . NET Core runtime installed.

Do I need to install any runtime or framework for self-contained deployment?

If you're using a self-contained deployment, you don't even need to install any runtime or framework at all. For example, if you're following my instructions to setup ASP.NET Core 2.1 on Linux, you can skip step 1, provided you publish a self-contained deployment in step 2.

What is self-contained deployment in NET Core?

Self-contained deployment. Unlike FDD, a self-contained deployment (SCD) doesn't rely on the presence of shared components on the target system. All components, including both the .NET Core libraries and the .NET Core runtime, are included with the application and are isolated from other .NET Core applications.

How do I deploy my application with the NET Framework?

Deploying the .NET Framework with a client application (for developers): Using InstallShield in a setup and deployment project Deploying the .NET Framework (for OEMs and administrators): For general information, see the .NET Framework blog. The .NET Framework provides a number of basic features that make it easier to deploy your applications:

What is NET framework dependent deployment?

Framework-Dependent deployment is the default deployment option in.NET Core and is the only deployment option for.NET Framework. In this mode, you deploy portable code that is ready to run in any compatible environment, provided the corresponding framework, either.NET Core or.NET Framework is installed.


2 Answers

You can use WiX to create a "bootstrap" installer, which will install required frameworks before installing your application.

http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_dotnet.html

like image 186
Cameron MacFarland Avatar answered Sep 26 '22 13:09

Cameron MacFarland


Find a version of the .NET Framework that all of your target computers already have, and set Visual Studio to target that version of the framework.

Then, just copy/paste all of the files out of the bin/release folder into a folder on the target computer and run your program's executable.

If all of your target computers have Windows 10, you can deploy using version 4.6 of the framework, and be guaranteed that your clients already have it.

like image 39
Robert Harvey Avatar answered Sep 26 '22 13:09

Robert Harvey