我在Windows商店應用中使用Winmd(Windows運行時組件)。當我嘗試實例化的定義中winmd一個類型,我得到以下異常:Windows商店應用中的TypeLoadException
System.TypeLoadException was unhandled by user code
HResult=-2146233054
Message=Requested Windows Runtime type 'SmartTech.BrokeredProxy.EnterpriseServer' is not registered.
Source=mscorlib
TypeName=SmartTech.BrokeredProxy.EnterpriseServer
InnerException: System.Runtime.InteropServices.COMException
HResult=-2147221164
Message=Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
ErrorCode=-2147221164
InnerException:
我說,我需要的所有引用和我做了該清單文件進行相應的修改。我錯過了什麼?任何人有一個想法是什麼原因造成的?
這發生在您使用.winmd文件組件編譯程序卻忘了跟其他文件一起打包。商店應用程序必須包含它所使用的全部**運行時組件。 –
最後你能解決這個問題嗎? –
@HansPassant看來OP正在使用[經銷商運行時組件](https://msdn.microsoft.com/en-us/windows/uwp/winrt-components/brokered-windows-runtime-components-for-side-加載的Windows商店應用程序)給予'BrokeredProxy.EnterpriseServer'。因此應用程序應該是sideload。 – ZX9