schockp-
I've spent a couple of days with the same problem. Here is the solution. You didn't say, but I assume you are running your component as a Server activation, meaning that it runs in it's own copy of DllHost.exe. This is the probelm. The CLR may not be able to find one or more assemblies that are used by the COM+ application. Assemblies that are missing will cause strange errors, including this one.
So: make sure that you put all assemblies that are used by the COM+ application, whether they are serviced or not, into the Global Assembly Cache. You can do this with the "gacutil" utility from the VS command line. You can also add the following to the "Post-Build Event" property associated with the project:
call "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat"
gacutil -u $(TargetName)
gacutil -i $(TargetDir)$(TargetFileName)
You have to change the first line to match where your Visual Studio common files are located, if not on the C drive in the default location. Add this to each project's Post Build event command line that is part of the COM+ app. It will install the assembly with each rebuild, automatically.
Good luck,
Joseph
|