Problem referencing Visio Modeling Engine from VS2005


C

Clint

I'm trying to code against the Visio Modeling Engine (installed with VS 2005
Team Suite), and I'm getting the error below. Any suggestions? It says to
try importing without class members, but no clues as to how to do that. A
google search didn't show up much beyond the fact that the
"ResolveComReference" task seems to be new in 2005.

Clint

Warning 3 The "ResolveComReference" task failed unexpectedly.
System.SystemException: The type library importer encountered an error
during type verification. Try importing without class members. --->
System.TypeLoadException: Method 'IVMEERModel_UpdateVerbalizer' on type
'MODELENGLib.VMEERModelClass' from assembly 'Interop.MODELENGLib,
Version=10.0.0.0, Culture=neutral, PublicKeyToken=null' is overriding a
method that has been overridden.
at System.Reflection.Module.InternalLoadInMemoryTypeByName(String
className)
at
System.Runtime.InteropServices.TypeLibConverter.TypeResolveHandler.ResolveEvent(Object
sender, ResolveEventArgs args)
at System.AppDomain.OnTypeResolveEvent(String typeName)
--- End of inner exception stack trace ---

Server stack trace:
at
System.Runtime.InteropServices.TypeLibConverter.nConvertTypeLibToMetadata(Object
typeLib, AssemblyBuilder asmBldr, ModuleBuilder modBldr, String nameSpace,
TypeLibImporterFlags flags, ITypeLibImporterNotifySink notifySink,
ArrayList& eventItfInfoList)
at
System.Runtime.InteropServices.TypeLibConverter.ConvertTypeLibToAssembly(Object
typeLib, String asmFileName, TypeLibImporterFlags flags,
ITypeLibImporterNotifySink notifySink, Byte[] publicKey, StrongNameKeyPair
keyPair, String asmNamespace, Version asmVersion)
at
Microsoft.Build.Tasks.TlbReference.GenerateWrapper(ComReferenceWrapperInfo&
wrapperInfo)
at
Microsoft.Build.Tasks.ResolveComReference.ResolveComReferenceTlb(ComReferenceInfo
referenceInfo, String outputDirectory, String refName, Boolean topLevelRef,
ComReferenceWrapperInfo& wrapperInfo)
at
Microsoft.Build.Tasks.ResolveComReference.ResolveComClassicReference(ComReferenceInfo
referenceInfo, String outputDirectory, String wrapperType, String refName,
Boolean topLevelRef, ComReferenceWrapperInfo& wrapperInfo)
at
Microsoft.Build.Tasks.ResolveComReference.ResolveReference(ComReferenceInfo
referenceInfo, String outputDirectory, ITaskItem& referencePathItem)
at
Microsoft.Build.Tasks.ResolveComReference.ResolveReferenceAndAddToList(ComReferenceInfo
projectRefInfo, ArrayList resolvedReferenceList, ArrayList moduleList)
at Microsoft.Build.Tasks.ResolveComReference.Execute()
at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr
md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle
md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage
msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
at Microsoft.Build.Framework.ITask.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode
howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup
projectPropertiesAvailableToTask, Boolean& taskClassWasFound)
WindowsApplication1
 
Ad

Advertisements

C

Clint

As an FYI, I think I found the answer (sort of). I used the "tlbimp"
application (in the VS\SDK\V2.0\bin folder" to create a new dll out of the
existing one. Seems to have worked ok, although I might end up abandoning
this approach anyway...

--
Clint
Clint said:
I'm trying to code against the Visio Modeling Engine (installed with VS
2005 Team Suite), and I'm getting the error below. Any suggestions? It
says to try importing without class members, but no clues as to how to do
that. A google search didn't show up much beyond the fact that the
"ResolveComReference" task seems to be new in 2005.

Clint

Warning 3 The "ResolveComReference" task failed unexpectedly.
System.SystemException: The type library importer encountered an error
during type verification. Try importing without class members. --->
System.TypeLoadException: Method 'IVMEERModel_UpdateVerbalizer' on type
'MODELENGLib.VMEERModelClass' from assembly 'Interop.MODELENGLib,
Version=10.0.0.0, Culture=neutral, PublicKeyToken=null' is overriding a
method that has been overridden.
at System.Reflection.Module.InternalLoadInMemoryTypeByName(String
className)
at
System.Runtime.InteropServices.TypeLibConverter.TypeResolveHandler.ResolveEvent(Object
sender, ResolveEventArgs args)
at System.AppDomain.OnTypeResolveEvent(String typeName)
--- End of inner exception stack trace ---

Server stack trace:
at
System.Runtime.InteropServices.TypeLibConverter.nConvertTypeLibToMetadata(Object
typeLib, AssemblyBuilder asmBldr, ModuleBuilder modBldr, String nameSpace,
TypeLibImporterFlags flags, ITypeLibImporterNotifySink notifySink,
ArrayList& eventItfInfoList)
at
System.Runtime.InteropServices.TypeLibConverter.ConvertTypeLibToAssembly(Object
typeLib, String asmFileName, TypeLibImporterFlags flags,
ITypeLibImporterNotifySink notifySink, Byte[] publicKey, StrongNameKeyPair
keyPair, String asmNamespace, Version asmVersion)
at
Microsoft.Build.Tasks.TlbReference.GenerateWrapper(ComReferenceWrapperInfo&
wrapperInfo)
at
Microsoft.Build.Tasks.ResolveComReference.ResolveComReferenceTlb(ComReferenceInfo
referenceInfo, String outputDirectory, String refName, Boolean
topLevelRef, ComReferenceWrapperInfo& wrapperInfo)
at
Microsoft.Build.Tasks.ResolveComReference.ResolveComClassicReference(ComReferenceInfo
referenceInfo, String outputDirectory, String wrapperType, String refName,
Boolean topLevelRef, ComReferenceWrapperInfo& wrapperInfo)
at
Microsoft.Build.Tasks.ResolveComReference.ResolveReference(ComReferenceInfo
referenceInfo, String outputDirectory, ITaskItem& referencePathItem)
at
Microsoft.Build.Tasks.ResolveComReference.ResolveReferenceAndAddToList(ComReferenceInfo
projectRefInfo, ArrayList resolvedReferenceList, ArrayList moduleList)
at Microsoft.Build.Tasks.ResolveComReference.Execute()
at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr
md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle
md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage
msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
at Microsoft.Build.Framework.ITask.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode
howToExecuteTask, Hashtable projectItemsAvailableToTask,
BuildPropertyGroup projectPropertiesAvailableToTask, Boolean&
taskClassWasFound) WindowsApplication1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top