.net – How to locate dependency of .NET Framework 3.5

dependenciesdeploymentnet

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

Best Answer

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