Clickonce Wpf Embed .NET 4.5 - c#

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.

Related

is .net framework required in install shield?

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.

Can visual studio 2008 deployment project run without .net installed in the system?

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 :
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 ?
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
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/
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
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)
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

How to prompt to install .NET Framework when deploying a WPF Browser Application?

Is there any way to make a WPF Browser Application prompt to install .NET Framework with ClickOnce like a regular installable WPF Application?.
Those publishing options are locked when the HostInBrowser property in the project file is set to True, which is necessary for the application i'm developing, however i need to make the installation of dependencies user friendly, and possibly from the .net framework installer already hosted in my server, as it would cut down greatly the use of bandwidth.
The program is intended to be used in intranet, as a "web page", by placing shortcuts on the desktop of each computer (which is done at the first run of the app), but most of the users don't have .NET Framework 4 installed.
is there any way to accomplish this without converting it to an installable wpf application?
Thanks in advance, Jesús.
No ClickOnce requires the .Net framework, because it's a component of it.
All ClickOnce applications require that the correct version of the .NET
Framework is installed on a computer before they can be run
You can however set a prerequisite which is a higher version of the framework, provided they have at least version 2.0 to begin with.
Commonly a bootstrapper written in managed code is used to overcome this limitation. You could use MSBuild for this, dotNetInstaller, or other third party tools. I've used dotNetInstaller a few times a recommend it, it's very flexible.

deploy application without the .NET

I have to give my customer my application. It's a simple application(3Mo).
I think it's really unnecessary to oblige my client to install the whole .NET framework (the 3.5) to work with a simple application (3 mo). I mean I'm sure that there is a way to avoid that, just include some dlls or something like that.
Well I have the dll in my project reference(LINQ dll, core Dll, system Dll, winfom Dll, office Dll and some other)
is it possible to give the application with those dll and that way I avoid installing the whole .NET framework?
Well I don't even need to make an MSI or setup project,
just give him the exe generated with Visual Studio and that's it.
I'm using VS 2010, C#, 3.5.NET
It's worth noting that Windows comes with various flavours of .Net installed depending on the version of Windows. If I remember correctly...
Win7 comes with .NET 3.5 SP1
Vista comes with .NET 3.5
XP SP2 includes .NET 2
Depending on your target audience you might find that this is good enough!
If these conditions are true:
a) you really want to avoid .NET framework dependency
b) it's a really easy/small application
Consider the option of porting it to c++
If not
use default framework (.NET 2, or 3.5 or 3.5SP1) that comes by default in windows as Dan Puzey said.
No it is not possible. Client has to install .NET Framework 3.5 (with SP1) redistributable package.
Edit: If you didn't want client dependency on .NET Framework you should choose another application type: Web application where .NET dependency is only on the server.
Most people have some flavor of .NET installed although most don't yet have 3.5. But you can create an installer that will download an install transparently to the user. Also if you target the Client Profile this dependency will be smaller.
Your client should have .net, there's no reason not to and if they haven't, they are a fool. Running XP with less than Service Pack 2 is dangerous. For the non-technically-inclined, compare it to using a van that's been subject to a manufacturer's recall. It may not necessarily be faulty, but the manufacturer has told you that it's no longer fit for use and are willing to make good at their own expense. As a responsible business owner, you wouldn't shirk that responsibility. In a similar vein, maintaining your Windows installation to the manufacturer's recommendation is not optional.
Have you considered making it a web app, with asp.net? The effort of porting should be less than a complete rewrite (depends on the applications functionality).

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