is .net framework required in install shield? - c#

I have one question regarding activeX control.
We have developed an application in VC++. In that we have dialog as a container and we are hosting in it, the ActiveX control developed in C# and .net framework 3.5. I want to know that is it required to include .net framework 3.5 in the install build that we will create?
Any help is appreciated.

This is really not related to Install Shield. If your application requires .NET Framework 3.5 to be installed, you need to install it by installer if it is not installed.
You can't guarantee it will be installed beforehand on end user's machine - this is the reason.

Related

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.
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
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.

Deploy .NET winforms application packaged with .Net Framework

I have a Winforms application developed in c# targetting .Net Framework 4.0. I created a setup for the application and packaged the .Net Framework 4.0 within the setup. During installation, the setup installs the .Net Framework 4.0 (if not installed already), and the application works fine.
I know it's not possible to run .Net application without .Net Framework. Is there some way I can package the CLR, JIT, and all required dll's with my application so that I won't need to install the entire .Net Framework 4.0 on the target machine?
Can i create my own installer for .Net Framework 4.0? Installer which insalls only the libraries which are required for my application, thus eliminating the need to install entire .Net Framework?
I have looked into ngen, Turbo Studio etc. to containerize the application but that does not suit for my purpose. Any help will be highly appreciated.
The .NET Framework was not designed to be deployed partially. I don't think this is possible - even if you will get that to work, it won't be supported officially. You might even see that your app is running but it might crash at any time later as soon as an assembly gets referenced (lazy by reflection, for example) you have no direct reference to.
Having only those parts of the framework deployed which are directly or indirectly referenced by your app is one of the main ideas of .NET Core - but you won't be able to do full-featured UIs with it by now.

Clickonce Wpf Embed .NET 4.5

I have a ClickOnce Wpf application which needs .Net 4.5 to run. My users are all over the country (about 60 of them) and organizing admin rights for each pc is going to be a very difficult task. Is there a way to embed .Net 4.5 into my application so I don't have to install .Net 4.5 on each user's pc ? I have already statically linked the sqlite database to remove the VC Redistributable installation.
Thx for any suggestions.
you must be administrator to install .net framework, there is NO sane way around this.
there are some tricks like once mentioned in:
.NET Framework install w/o admin rights
but thats generally a very bad idea.
WIN8 users will have it installed.
WIN7 will have only 3.5 maybe downgrade to .net 3.5? do you really use 4.5 features?
If you use ClickOnce and your user doesn't have the Framework 4.5 installed the installer will check this and will automatically download the correct Framework.
To summarize you have nothing to do, ClickOnce process handle this for you.

.NET Framework - Installing the application

I want to make an application (windows application) using C# and .NET Framework 3.5.
I want to make the install the application. I want the installation to determine - whether the user has the framework in the system. If the user does not have a framework - I want to install it.
How to create an installation of application with NET Framework 3.5?
If you use something like ClickOnce to install your application this will happen automatically. When you set it up it determines which version of .NET is required for your application. It doesn't include the required version in the installer - so your installer says the same size regardless - but puts in code that will install the correct version from Microsoft as required.
You could also use the Windows Installer XML toolkit, which contains ways to determine whether the required .NET version is installed. Also, you get an MSI installer.
Another way would be to use InnoSetup. You can write code using the integrated Pascal script interpreter which checks for the installed framework version.
The Installer project type that comes with "higher" versions of Visual Studio also contains ways to make the .NET Framework a requirement.
I've worked with all three of them and can tell you: it works. There may be other ways, like NSIS, but I haven't used them.

Install (activate) .NET 3.0 Framework with an application in Vista

if i have an application that requires .net 3.0, what is the proper way to make an install file out of it, that will install the application and then install (activate) the .net 3.0? i tried publishing my project through visual studio 2008 (c#) which created the installer and the .net activator, but it didn't work properly on computers other than my own, when the .net 3.0 was not present.
i though i could bundle http://www.microsoft.com/downloads/details.aspx?FamilyID=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en with the application, which would download and install .net 3.0 if needed. this could work ok on non-vista systems, but on vista, the redist package reports an error: you must use turn windows features on or off in the control panel to install or configure microsoft .net framework 3.0
The key is to install the .net framework if it is not there - regardless of the OS. Also, just go ahead and install the .Net 3.5 framework if you are going to install one of them.
Anyway, if you are using the built in installer that comes with Visual Studio, this is a real pain in the butt. You would be better off, and saner if you went with a different installer package. Install Shield, Wise, InstallAware will all do it for you. I believe you can also find better guidance on how to do this with Wix and NullSoft Installer.
http://www.improve.dk/blog/2007/06/10/creating-a-dotnet-bootstrapped-installer-using-nsis
How can I detect .NET 3.5 in WiX?
Windows Vista has already .NET Framework 3.0 installed.
Now if you wanted for example to have .NET Framework 3.5 installed you could create a Setup Project and then right click and go to View->Launch Conditions. There will be a .NET Framework launch condition where you can specify the required version of the framework and an URL to download from.
Here's a post about Launch Conditions in a Setup Project.

Categories