VS 2013 could not resolve COM reference (STG_E_PATHNOTFOUND)

0

Good Day. I have a COM dll which registered using regsvr32 utility. When I tried to add reference to a project, the library is visible in reference list but when I press OK button the error occurs (STG_E_PATHNOTFOUND). Also popup hint on reference in browser shows correct path and dll not moved anywhere from it's registered location. Project and dll have same x64 bitness.

StackTrace

Error   1   The "ResolveComReference" task failed unexpectedly.
System.IO.DirectoryNotFoundException: The path  could not be found. (Exception from HRESULT: 0x80030003 (STG_E_PATHNOTFOUND))

Server stack trace: 
   at System.Runtime.InteropServices.ComTypes.ITypeLib.GetDocumentation(Int32 index, String& strName, String& strDocString, Int32& dwHelpContext, String& strHelpFile)
   at System.Runtime.InteropServices.Marshal.GetTypeLibName(ITypeLib typelib)
   at Microsoft.Build.Tasks.ComReference.GetTypeLibNameForITypeLib(TaskLoggingHelper log, Boolean silent, ITypeLib typeLib, String typeLibId, String& typeLibName)
   at Microsoft.Build.Tasks.ComReferenceInfo.InitializeWithPath(TaskLoggingHelper log, Boolean silent, String path, ITaskItem originalTaskItem, String targetProcessorArchitecture)
   at Microsoft.Build.Tasks.ComReferenceInfo.InitializeWithTypeLibAttrs(TaskLoggingHelper log, Boolean silent, TYPELIBATTR tlbAttr, ITaskItem originalTaskItem, String targetProcessorArchitecture)
   at Microsoft.Build.Tasks.ResolveComReference.ConvertAttrReferencesToComReferenceInfo(List`1 projectRefs, ITaskItem[] typeLibAttrs)
   at Microsoft.Build.Tasks.ResolveComReference.Execute()
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

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.CommandLine.OutOfProcTaskAppDomainWrapperBase.InstantiateAndExecuteTask(IBuildEngine oopTaskHostNode, LoadedType taskType, String taskName, String taskLocation, String taskFile, Int32 taskLine, Int32 taskColumn, AppDomainSetup appDomainSetup, IDictionary`2 taskParams)

Error screen

c#
visual-studio-2013
com
regsvr32

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0