Click here to Skip to main content
Email Password   helpLost your password?

Sample Image - viewer.jpg

Introduction

This application is a part of the installation system that I use. My installation process uses an input XML file that is created by the application, to deploy and register the assemblies in the same locations as in the deploying machine. Using this method I reduce many errors. You can use this application to test your applications in a production environment. You can test and see if all of your application references match the files on your production server and to find out any existing problems.

The code is pretty straight forward. The only complicated part was to find out if a given assembly is registered as a COM+ component. To check it out, you need to get the COM+ component CLSID from COM+ using comadmin.dll, find in registry the CLSID InprocServer32 Key, and check if InprocServer32 Assembly string value matches the given assembly full name.

To navigate through the COM+, I use a wrapper assembly of comadmin.dll which I created using tlbimp.exe. The deploying code is a reference to the wrapper assembly of COM+ 1.5 comadmin.dll. If you are working with COM+ 1.0, you need to recreate the wrapper assembly using tlbimp.exe.

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
GeneralRed color in the tree
uljo2
21:24 5 Feb '07  
Hi,

I guess it indicates that something is wrong. But what?

Br Ulf
GeneralRe: Red color in the tree
nhenny2000
12:33 25 Sep '07  
might want check the MSDTC service to see if it is having issue...might have event viewer errors.
GeneralI Got the solution
avinash barnwal
1:58 9 Jan '07  
Just Unregister the ComAdmin.dll from the C:\windows\system32\com\Comadmin.dll using

regsvr32 C:\windows\system32\com\Comadmin.dll /u

and register the comadmin.dll (1.0) version copied from the Windows 2000 Server on the Development (XP) PC.

Now Add the Reference to the newly Registered Comadmin.dll.

You will now find the Interop.Comadmin.dll in the Bin Folder of the .NET program using the Comadmin.dll.

Just Run ILDASM.EXE from the VS.NET 2003 Prompt and open this Interop.Comadmin.dll.

You should not find the COMAdminCatalog2 kind of thing in the end of the list.

and then deploy this Interop. and the recompiled .NET EXE to the Windows 2000 Server. and enjoy!!!

Enjoy!
Smile

Avinash Barnwal
Software Developer.
FQS

Generalpowershell script to list out dependencies.
tovirtualme
6:34 5 Jan '07  
Here's a lil powershell script to list out dependencies. It doesn't try to find where the assembly is being loaded up from, but sometimes one just want to find that pesky version mismatch.
hope it helps. Script
QuestionJob Role??
nc2000
6:18 26 Jun '06  
No offence intended - I was just wondering (based upon ur profile photo) is your present IT job/role anything to do with requirements gathering or contract negotiations - if so, luv ur style! Wink

BTW - nice app.
GeneralHow to enlist assemblies?
zux
2:44 8 Nov '04  
I need to check if some assembly exists on deployment machine (with probing: local folder/GAC).

I could do it by:

/////////////////////////////////
IDbConnection con=null;
Assembly asm=null;
asm=Assembly.LoadWithPartialName("Oracle.DataAccess");
if (asm != null)
{
// Do something
con=new
Oracle.DataAccess.Client.OracleConnection();
}
////////////////////////////////

Is there more efficient way, without loading assembly?
GeneralRe: How to enlist assemblies?
Natty Gur
10:24 19 Nov '04  
Hi,

If I got you right actually there is. If you open GAC folder from DOS prompt you will found out that actually GAC is build from folders naming after dlls name, version and strong key. You might use this info to find out if given DLL exist in GAC. Anyway I prefer to load assembly in order to gain such info.

Natty.

GeneralOther dependecy walker
tolemac
8:59 19 May '04  
Hi,

I have published my own .net dependency walker tool in my weblog:

tolemaC weblog

the web log is in spanish but the tool is in english, this is the link for the tool:

DependsNet.zip

tolemaC
GeneralDoes it make probing?
Ivan Fernandez
6:39 21 Jan '04  
One question about your tool... Does it make probing if I scan a .exe with a exe.config file?

Thanks,

Ivan.

Iván Fernández
GeneralRe: Does it make probing?
Natty Gur
6:46 21 Jan '04  
If I get you right no. it just use metadata to get assembly dependent , check thier locations and validate if they really exist on your machine.
GeneralA graphical approach
drewnoakes
10:12 13 Jan '04  
Hi,

I've made a similar app that analyses dlls (and also vs.net solution files, though only for vs.net 2000). It then plots a dependancy chart using DOT.

You can see examples, download binaries and source here:

http://www.drewnoakes.com/code/dependancyanalyser/[^]

Regards,

Drew

Drew Noakes
drewnoakes.com
GeneralRe: A graphical approach
Natty Gur
18:25 13 Jan '04  
Cool Big Grin,

If you can add the logic of assembly location and indication if the reference assembly exist on disk I'm dropping mine and using it ...
GeneralRe: A graphical approach
mephianna
0:41 12 Feb '08  
Thank you!
This program was just what I needed!
Smile
GeneralRe: A graphical approach
oliwan
7:57 24 Jun '08  
Drew Noakes,

I opened your Solution with VS2005. VS2005 automatically converts the VS2000 format to VS2005 format. After compiling, your Dependency Analyser perfectly analyses .NET 2.0 Assemblys.

Good Program! Thanks.

--* Oli *--

GeneralInterface Interop.COMAdmin.ICOMAdminCatalog2 failed
Claus Brod
2:35 13 Jan '04  
Hi,

just downloaded the demo project and built it using VS.NET 2003. When I run the dependency viewer on a .NET assembly, I get the following runtime error:

An unhandled exception of type 'System.InvalidCastException' occurred in DevNetInstaller.exe

Additional information: QueryInterface for interface Interop.COMAdmin.ICOMAdminCatalog2 failed.

This happens in function IsDllInCom (ReadProject.cs). Can this be caused by inconsistencies due to different versions of comadmin.dll as you have described it in your article?

Thanks,

Claus (clausbrod.de)


GeneralRe: Interface Interop.COMAdmin.ICOMAdminCatalog2 failed
Natty Gur
3:09 13 Jan '04  
Hi,

Two options:

1) as you mention, comadmin.dll may not work due to different versions or because I made the wrapper assembly with tlbimp of CLR 1.0.

2) There are inconsistent data in COM+ catalog. Usually there are situations where components are listed in the MMC tree but don’t show up on the MMC List (right side). You can see the COM+ application ID (in the code) and to check COM+ MMC for that application components.

Let me know what and if it helps you …

GeneralRe: Interface Interop.COMAdmin.ICOMAdminCatalog2 failed
Claus Brod
3:16 13 Jan '04  
I already tried to build my own Interop.COMAdmin.dll from my local comadmin.dll. This did not help, so potential inconsistencies in the catalog are more likely; need to check that more thoroughly first.

Tnx!

Claus

GeneralRe: Interface Interop.COMAdmin.ICOMAdminCatalog2 failed
nedcod
23:41 13 Jan '04  
I had a similar problem.

Removing the Interop.COMAdmin.dll reference and adding COMAdmin.dll instead solved it.

Thanks, just what I was looking for!
GeneralRe: Interface Interop.COMAdmin.ICOMAdminCatalog2 failed
Claus Brod
0:30 14 Jan '04  
Yup, this fixed the problem for me as well.

Thanks!

Claus

GeneralRe: Interface Interop.COMAdmin.ICOMAdminCatalog2 failed
mayoroj
13:30 2 Aug '05  
Sorry to bug, but I hav e a smilar problem.
How in c# do you make the reference directly to the dll instead of the interop?
Generaldemo .zip file
Antonio Barros
10:45 12 Jan '04  
Hi

I've downloaded your zip files and i think that the demo .zip is the same file that of the installer ?
Can you tell me if this is correct ?

Thank you
A.Barros

GeneralRe: demo .zip file
Natty Gur
17:56 12 Jan '04  
Yes, you can find DevnetInstaller.exe under /bin/debug directory.


Last Updated 12 Jan 2004 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010