views:

678

answers:

3

Hi all, I'm struggling with a deployment issue which leaves me completely lost. It goes like this:

I have a Visual Studio Deployment project which installs an app - some assemblies each compiled to target .NET Framework 2.0. I have recently strong named them all (because one of the assemblies is a "Shared Add-In" for MS Word and MS Outlook and the guidelies says that these should be strongly named. I have no idea why.) I think this is when my problem began. But I can just as well be wrong.

Now the problem is that after installing the .MSI-package, I try to run the app and it crashes. When I now turn to Windows Update - it somehow detects that .NET Framework 3.5 sp1 needs to be installed. It does not detect this if I run it before installing my .MSI package!

After installing .NET Framework 3.5, my app kicks to live.

I have no idea where this dependency comes from! (If I can't figure it out, then I will have to make 3.5 required for my app, but I'd be happy if I could track down where the dependency comes from.)

I don't know if this is a clue, but before I install 3.5 I try to inspect the assemblies with Reflector and Reflector is unable to navigate from one assembly to another saying "The following assembly name can not be resolved automatically" and then it states the correct assembly name, version and PublicKeyToken of a file that is present in the same folder. Even more strange, it does so for a dependency to the Microsoft.VisualC assembly. But then again: after installing 3.5 everything is resolved.

I'm most grateful for anything that can shed a light on my problem,
   TIA

A: 

It's hard to understand where you introduced the depedency without seeing your code. You could use Reflector (free tool) to analyse your DLLs and see what references the contain.

cdonner
As stated, I *use* Reflector. I cannot find reference to anything but 2.0!
danbystrom
Did you accidentially include .Net asssemblies in your MSI package?
cdonner
I do have two Interop Assemblies located in Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11 ...
danbystrom
Does the target computer have Office 2007? See the note at the bottom of this page: http://msdn.microsoft.com/en-us/library/15s06t57.aspx
cdonner
No, it does have Office 2003 (which is v11). Remember that after Framework 3.5 gets installed: things kicks to live again - so Office 2007 can not be the missing key here...? I'll do some more tests today.
danbystrom
Think I got a clue - from the location of the Office PIAs. It tried adding "Visual Studio Tools For Office 3.0" as a prerequisity in the setup project (although proveably not strictly required on it's own). When I build the setup project I got a perfectly understandabe warning:
danbystrom
".NET Framework 3.5 is requiered for Visual Studio Tools for Office 3.0".
danbystrom
Yeah, that's what I thought after reading the note on MSDN.
cdonner
A: 

Go to your Solution Explorer. Select your setup project. Right click. Goto View > Launch Conditions. Then inside the new window that opens, select .NET Framework, and go to its properties. One of the properties is called Version. There, if you have 3.5 then that is your problem. Change that to 2.0 and you will be OK.

Petros
It already is 2.0.50727.
danbystrom
I have the same problem, already set to 2.0 yet upon installation it tries to install 3.5SP1. Building with VS2008.. but I have other setup projects that work. the target machine has SQL2005 and thus 2.0 is already installed there as well. Anyone got a clue?
Vincent
When that happens, I think we probably reference something that depends on 3.5, even though our project targets 2.0. I'd check all the references in order to see if something is a 3.5 dll.
Petros
A: 

Well, well, after some sleepless nights I finally sorted out that it's really not the full .NET Framework 3.5 that's required. Just some files that happens to be distributed with it. One of my assemblies was written in C++/CLI and then I also need to distribute the prerequisity "Visual C++ Runtime Libraries (x86)". Kinda obvious once you spotted it. sigh

danbystrom