I have a two .NET assemblies which are registered as COM+ components and I\'m testing them from a regular console application test harness;
Dim objFirst As N
I have finally found a solution to the problem described above. I'm answering the question myself here to save anyone else the pain that I went through trying to get this to work.
Go to Component Services > COM+ Applications > YourComApplication
Bring up the properties window for YourComApplication and go to the Activation tab.
Under "Application Root Directory", supply the path in which your DLLs reside.
Create an "application.manifest" file for your COM+ application and put it in the same directory as above. A sample file looks like this;
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> </assembly>
Also, make sure that you have a separate directory for each of your COM+ applications. This approach will allow you to have mulitple COM+ applications based on .NET assemblies calling each other without anything having to be in the GAC.
Although you obviously resolved the issue with the steps included in the answer, this problem can also occur if you have a version of PowerShell that is not compatible with the assembly you are trying to load.
For example, you may have an assembly targeting .NET framework 4.5.1, but the PowerShell version you are running is version 2.0. If you upgrade the version to 4.0 or 5.0, you should have no issue.
Have you looked into using regasm to register the assemblies for access with COM. I am not sure but it may have to do with the /codebase parameter being passed when you register the assembly. It is worth a shot. Hope this helps.