HighTechTalks DotNet Forums  

error MSB3217: Cannot register assembly

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


Discuss error MSB3217: Cannot register assembly in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
=?Utf-8?B?SnVhbiBEZW50?=
 
Posts: n/a

Default error MSB3217: Cannot register assembly - 07-24-2007 , 09:36 PM






Hi,

In an interop marked assembly, I have a class which implements an interface
defined in another project, also marked for interop, and yet I am getting
this error:

-------------
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Micr osoft.Common.targets(2721,9):
error MSB3217: Cannot register assembly "C:\Exactus\Version
2\Foundation.v2\Exactus.ORM.Session.v2\bin\Debug\E xactus.ORM.Session.v2.dll".
Method 'PrepareInstanceInSession' in type
'Exactus.ORM.Session.v2.SessionManager' from assembly
'Exactus.ORM.Session.v2, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=263f90f9ba01a928' does not have an implementation.
---------------

The strange thing is that there IS AN implementation in that type
(Exactus.ORM.Session.v2.SessionManager) of the method
'PrepareInstanceInSession'. The interface is defined like so:

------
namespace Exactus.ORM.Session.v2
{
[Guid("296F15FF-04FF-4551-B383-15767E809826")]
[Description("ISessionManagerNET2 Interface v2")]

[InterfaceType(System.Runtime.InteropServices.ComIn terfaceType.InterfaceIsDual)]
[ComVisible(true)]
public interface ISessionManagerNET2
{
[DispId(2000), Description("Create an instance of a persistence
capable object (either Set or Object) via late binding")]
object CreatePersistenceCapableInstance(string assemblyName, string
qualifiedClassName);

[DispId(2001), Description("Colocar la sesión y los privilegios
sobre un PersistentObject o PersistentSet existente")]
void
PrepareInstanceInSession([MarshalAs(UnmanagedType.IDispatch)]object instance);
}
}
------

While the implementing class in the other assembly is defined:

----
namespace Exactus.ORM.Session.v2
{
[Guid("E9FDFF6D-FAEF-4045-A5E9-37662EBB932E")]
[COMDescription("JD SessionManager Class")]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("Exactus.Session_v2")]
public class SessionManager : ISessionManager, IDisposable,
ISessionManager2, ISessionManagerNET, ISessionManagerNET2
{
[DispId(2001), Description("Colocar la sesión y los privilegios
sobre un PersistentObject o PersistentSet existente")]
public void
PrepareInstanceInSession([MarshalAs(UnmanagedType.IDispatch)] object instance)
{...}
}
// ...
}

----

What's wrong here?


I also tried removing the MarshalAs atttribute from the class and also from
both the class and the interface - none of these scenarios help at all!


--
Thanks in advance,

Juan Dent, M.Sc.

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.