SxS installations and WiX - installation

I'm trying to figure out how to deal with installation and deployment of our project which is a framework. Typically developers would install the framework and then have their .Net applications reference our dlls.
The framework has 2 levels:
A number of native C++ dlls
Some C++\CLI and C# assemblies (all are dlls) that reference the native dlls
I want to provide an installer that puts the .Net assemblies in the GAC and installs the native assemblies in the WinSxS folder. So far I haven't been able to find much info about installing SxS assemblies. I know it can be done using MSI, and I was wondering if anyone knows how to do it with WiX or with some other installer tool.
I believe this cannot be done using the Visual Studio setup projects.

I did a search in the wix mailing pile and "Tutorial: How to install files into WinSxS" came up. Hope it's helpful to you.

Related

The SDK windows jungle

I'm kind of lost with all these SDK windows versions.
For instance, I installed vs2013 on windows8.1, and I (also) need to link my apps against vs2008 runtime (platform toolset).
Should I install the whole VS2008 too or just the API. In the last case, what SDK do I have to install ?
You are talking about two very distinct things. The Windows SDK only covers the declarations and libraries that you need to make winapi calls. SDK v8.1 is suitable to target any modern Windows version since Vista, you select the Windows version you want to target by setting the _WIN32_WINNT macro. Note that XP requires an older SDK version, v7.1 is the last one that's still suitable and selected by setting the Platform Toolset to v120_xp.
The runtime libraries are a pure implementation detail of Visual Studio C/C++ projects and completely unrelated to the SDK. When you build such a program on VS2013 with the /MD compile option then it will have a dependency on msvcr120.dll, possibly msvcp120.dll and others. These DLLs implement the C runtime library and the C++ standard classes. And possibly MFC, ATL, OpenMP and AMP if you use those libraries.
If you still have a dependency on the VS2008 version of those libraries then you are liable to have a Really Big problem. You can obtain the release versions of those DLLs from the redist installer you can download from Microsoft. Having a dependency on the debug version requires having VS2008 installed on your machine. But having trouble linking the program and misery at runtime is highly indicated, the runtime libraries changed a great deal between VS2008 and VS2013 thanks to the new C++11 language standard. Having more than one CRT in a program is in general liable to cause lots of trouble.
You need to strongly pursue getting the library that still has the VS2008 dependency rebuilt. Contact the owner of the library if necessary to get an update.

Building an installer that runs another installer

My company has a project for which I've developed an application in c#. I can create an installer for that application. However, the project requires users to install another application built in c++ that has an installer built using Visual Studio 10. Is there a way that I can build an installer that includes installation of the second product before installing my application?
What you are looking for is a bootstrapper or chainer. The WiX Toolset provides this functionality in a tool called Burn. It allows you to provide a single user experience while installing all of your setup packages. You can read about it more in WiX .chm.

Installer for an IE add-on and automated prerequisite installs?

I have a project that was given to me where, organically, they created it using Add-In Express and Visual studio. The issue they ran into is that some of the prerequisites needed to be installed before the actual add-in could be installed. So there is a 2 step process. I have some experience with InstallShield and believe my version is 2009. I am wondering if that will handle the install better than add-in express or if I should create a manual package in VS2010. Also, is there a way to silently install the prerequisites?
As a regular .net based application your Add-in Express based solution relies on the .net framework. So, .net framework should be installed on the end user PCs. Your solution may also include a lot of references or dependencies (if any) that should be installed before running the add-in installer.
You may be interested in the Video: Fully featured setup projects for Office solutions article on our technical blog.

Deploying applications built in Visual Studio 2010 on older windows platforms

I am trying to deploy an application built in Visual Studio 2010 on older Windows platforms. However, the application is complaining about library files such as MSVR100.dll and MSVCP100.dll. I know I can just install these files using vcredist_x86.exe but that is not possible on a large scale.
I am trying to find these files and package them together with my application but am having quite some trouble in trying to locate these files.
Does someone know where these files are installed?
Thanks.
You should use the merge modules provided by Microsoft to include the runtime libraries in your installer.
http://msdn.microsoft.com/en-us/library/ms235299.aspx

Install different version of merge module depending on processor architecture

I have a Windows .net solution that is deployed with a Visual Studio Deployment project.
My exe is a win32 app that runs fine on either a x86 or x64 windows.
However I included a merge module (*.msm) from a third party vendor which is available in a x86 and x64 version.
Now I could copy my whole deploy project and just change the msm, but I'm a lazy guy and the best thing would be to include both msm's in my installer and only install the module which fits the processor of the client machine.
Is there a way to do this with Visual Deployment projects?
Merge Modules seem to lack a Condition property like included exe / dll files have.

Resources