HighTechTalks DotNet Forums  

Help with error: Cannot register assembly ... Could not load type ... from assembly ....

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss Help with error: Cannot register assembly ... Could not load type ... from assembly .... in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jason
 
Posts: n/a

Default 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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.