Help with error: Cannot register assembly ... Could not load type ... from assembly .... -
12-18-2007
, 06:30 PM
Hello, everyone. It has been quite a while since I've had to use c# to make a COM plugin. I tried following some documentation I had from the past and except for a few changes in the screens from VS Pro 2001 to VS C# Express 2008 it seems the steps are the same. However, when I try to build my project it fails at the final register step:
Error 1 Cannot register assembly "C:\Users\Jason\Documents\Visual Studio 2008\Projects\JasonTestPlugin\JasonTestPlugin\bin\ Release\JasonTestPlugin..dll". Could not load type 'MetraTech.Custom.Plugins.Jason.JasonTestPlugin' from assembly 'JasonTestPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c92fadf32d4017ca'. JasonTestPlugin
At first I thought this was because I was doing cross platform development. I copied the the Reference assemblies from the target machine over to my dev environment so I'd get the compilation and intellisense stuff working properly. That didn't seem to be a problem. i.e. everything compiled just fine. But it wouldn't register. I thought maybe since the dependant assemblies weren't registered on the dev envronment maybe that was a problem. But when I copy the dll over to the target system and run regasm JasonTestPlugin.dll /codebase I get the exact same error:
RegAsm : error RA0000 : Could not load type 'MetraTech.Custom.Plugins.Jason.JasonTestPlugin' from assembly 'JasonTestPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c92fadf32d4017ca'
I am a bit stumped as to what is going on. Here is an except from the relevant part of my code:
using System.Runtime.InteropServices;
[assembly: Guid("54afaa4a-fbb2-432e-91a7-2b491f12005c")]
namespace MetraTech.Custom.Plugins.Jason
{
using System;
using MetraTech.Pipeline.PlugIns;
using MetraTech.Interop.MTPipelineLib;
[ClassInterface(ClassInterfaceType.None)]
[Guid("a7855413-1216-4348-afbe-cf237f51702c")]
public class JasonTestPlugin : PipelinePlugIn
{...
Any pointers at how to debug this would be apreciated for a rusty fellow like myself.
Thanks,
Jason |