3

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

3 Answers 3

2

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

0

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.

7
  • As stated, I use Reflector. I cannot find reference to anything but 2.0! Mar 18, 2009 at 15:26
  • Did you accidentially include .Net asssemblies in your MSI package?
    – cdonner
    Mar 18, 2009 at 15:30
  • I do have two Interop Assemblies located in Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11 ... Mar 18, 2009 at 16:02
  • Does the target computer have Office 2007? See the note at the bottom of this page: msdn.microsoft.com/en-us/library/15s06t57.aspx
    – cdonner
    Mar 18, 2009 at 16:53
  • 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. Mar 19, 2009 at 7:34
0

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.

2
  • 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? Oct 27, 2010 at 3:33
  • 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
    Oct 27, 2010 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.