I have created a setup project with VS2008 for a .NET Windows Forms application using .NET Framework 3.5.
But I want to create an installation with WiX 3.5. Since I have VS2008 installed, I expected I can use the instructions in the help section How To: Install the .NET Framework Using a Bootstrapper. Unfortunately this includes a reference to the directory
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\
that I cannot find on my PC although this should be present if VS2008 is installed. Should I find it somewhere on my PC or do I have to install this manually? Why should this be necessary?
What are other opportunities to automatically install the .NET framework when required?
Edit:
The WiX documentation describes the path for VS2005 on a 32 bit operating system. I found the boostrapper at
C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper
There are a few related questions to yours, check out WiX: Where can I download the bootstrapper?
Related
I am very new to the installer world.
I have successfully made an .msi for my application and it is building with short-cuts and also uninstalls correctly.
My next goal is to package .Net 4.5 with the installer and have it be installed prior to the installation of my application.
I also have a third party application that needs to be installed. It is packaged as an msi.
From what I can gather I need to develop a Bootstraper solution to have these applications install in sequence.
Can anyone provide a guide as to how to implement an installer in such a way? My searches have come up with a bunch of partial implementations with an assumption of the design of a Wix Bootstrapper Project in Visual Studio.
I hope this helps someone. It took me 5 hours to figure it out. Maybe, my bad, but did not find anything about it in the docs or blogs.
So my scenario is: VS 2012, WIX 3.6 with Burn bootsrapper, create a Setup executable in order to check .NET Framework 4.5 and install it by downloading if not installed already. Sounds simple. And it is. Actually very.
Create your MSI installer project (WIX Setup Project), to produce an installer for your application.
Create a WIX Bootstrapper Project for your Setup executable.
Follow the instructions here, to create your Boundle.wxs
Add a reference to the WixNetFxExtension.dll which can be found in the WIX program directory.
Include the following line in your Chain:
<PackageGroupRef Id="NetFx45Redist"/>
Actually the WixNetFx extension contains a working install package definition for the .NET Framework 4.5.
As caveman_dick mentioned, Burn in WiX 3.6 supports this but you may also want to take a look at dotNetInstaller (http://dblock.github.com/dotnetinstaller/). We use it to install .NET 4.0 but I'm sure it works for installing 4.5 as well. It can also install other MSI dependencies very easily.
I need to distribute my WPF application. I am using WIX for building the Setup.exe.
But I also need to ensure that the .net framework 4.0 is first installed on the user's PC. I have downloaded dotNetFx40_Full_x86_x64.exe but how do I create a WIX installation that will contain MyApp.Msi and the .net framework redistribution file?
What I really want is to have just 1 Setup.exe that contains and runs both installs(my.msi and the .exe) in order.
Can this be done with WIX? Is there a better solution?
You can use the WiX bootstrapper technology (referred to as Burn) to create a single bootstrapper to install .NET and your .msi. Burn will enable you to embed the .NET redistributable and your .msi into a single setup.exe as well.
A setup bootstrapper is the file that could install the .NET framework. You can read about the WiX bootstrapper here. If you want the final output to be one .EXE file, you can pack the bootstrapper and the .MSI file into a new .EXE file using IExpress. IExpress is included in your Windows installation.
With WiX + IExpress you can create an installation package contained in one .EXE file.
i've made an assembly in the .net framework that I intend to publish to the GAC but I can't find the gacutil utlity.
I've been googling a while and I've found a lot of suggestions, but nothing works:
Copy the assemby to %window%\assemby [DOES NOT WORK]
Copy the assemby to %window%\Microsoft.NET\assembly [DOES NOT
WORK]
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\gacutil.exe /i
"assembly" [returns an error: this assembly is built by a runtime newer
than the currently loaded runtime and cannot be loaded]
Does anyone have idea to solve this?
If you've got VS2010 installed, you ought to find a .NET 4.0 gacutil at
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools
The 7.0A Windows SDK should have been installed alongside VS2010 - 6.0A will have been installed with VS2008, and hence won't have .NET 4.0 support.
VS 2012/13 Win 7 64 bit
gacutil.exe is located in
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools
There is no Gacutil included in the .net 4.0 standard installation. They have moved the GAC too, from %Windir%\assembly to %Windir%\Microsoft.NET\Assembly.
They havent' even bothered adding a "special view" for the folder in Windows explorer, as they have for the .net 1.0/2.0 GAC.
Gacutil is part of the Windows SDK, so if you want to use it on your developement machine, just install the Windows SDK for your current platform. Then you will find it somewhere like this (depending on your SDK version):
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools
There is a discussion on the new GAC here: .NET 4.0 has a new GAC, why?
If you want to install something in GAC on a production machine, you need to do it the "proper" way (gacutil was never meant as a tool for installing stuff on production servers, only as a development tool), with a Windows Installer, or with other tools. You can e.g. do it with PowerShell and the System.EnterpriseServices dll.
On a general note, and coming from several years of experience, I would personally strongly recommend against using GAC at all. Your application will always work if you deploy the DLL with each application in its bin folder as well. Yes, you will get multiple copies of the DLL on your server if you have e.g. multiple web apps on one server, but it's definitely worth the flexibility of being able to upgrade one application without breaking the others (by introducing an incompatible version of the shared DLL in the GAC).
There actually is now a GAC Utility for .NET 4.0. It is found in the Microsoft Windows 7 and .NET 4.0 SDK (the SDK supports multiple OSs -- not just Windows 7 -- so if you are using a later OS from Microsoft the odds are good that it's supported).
This is the SDK. You can download the ISO or do a Web install. Kind-of overkill to download the entire thing if all you want is the GAC Util; however, it does work.
I want to add some .net 4.0 dlls to the gac, I know that the new gac is C:\Windows\Microsoft.NET\assembly
I cannot use the gacutil because visual studio in not installed on the deployment machine, and i cannot simply drag/drop the dll to the folder as i usually do in the previous versions.
How can I install the dlls to the GAC.
It is part of Windows SDK and can be download separately at http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6B6C21D2-2006-4AFA-9702-529FA782D63B. This installation will have gacutil.exe included. But first check it here: C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin you might have it installed
where is gacutil.exe?
UPDATE : Modified the link. Windows SDK for .Net 4.0
Using Microsoft Installer Package. You can get download of installer from
http://www.microsoft.com.
I am not confirmed but ideally Gacutil must be part of framework and you can find it out in .net framework folder
I've built an installer with WIX and have packaged it with the .NET 4.0 framework using the GenerateBootstrapper task. Now .NET 4.0 cannot be installed on XP SP2, but it appears to have no precondition check for this so its installer fails halfway through.
I'd like to add my own check to make sure the OS that the entire package is being installed on is supported by the .NET 4.0 framework. Is there a way to embed an OS/Service Pack check in the bootstrapper when you use GenerateBootstrapper? If not, how else can I accomplish this?
You could add a condition to the bootstrapper package definition file so that the bootstrapper will check for the Windows version. The description file is located at
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\
Packages\DotNetFX40\Product.xml
on a 64-bit Windows system or at
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\
Packages\DotNetFX40\Product.xml
on a 32-bit Windows system. The package.xml already contains such a check, see the line
<!-- Block install on less than Windows XP SP2 -->
<FailIf Property="VersionNT" Compare="VersionLessThan"
Value="5.1.2" String="InvalidPlatformWinNT" />
I couldn't find the relevant documentation, but it looks as if the third number of the VersionNT value is the service pack level, so probably changing the condition to check for a value of "5.1.3" will do the job.