问题描述
我使用以下类创建了一个Windows运行时组件DLL:
命名空间WindowsRuntimeComponent1
{ch   公共ref class Class1密封
{
   市民:
       的Class1();
        static Platform :: Type ^ GetTypeTest();
}}
当我从C#Windows应用商店应用程序中使用它时,应用程序使WACK失败错误:
由类型WindowsRuntimeComponent1引用的System.Type类型.__文件C中的IClass1Statics:\ Program Files \ WindowsApps \ occ839635-2b37-41ba-a6eb-8e01fdfac0d3_1.0.0.2_x86__ze744fdnb0cr8找不到\ WindowsRuntimeComponent1.winmd。元数据
文件中引用的所有类型都必须是可发现的。
文件C中由类型WindowsRuntimeComponent1.Class1引用的System.Type类型:\ Program Files \ WindowsApps \ occ839635-2b37-41ba-a6eb-8e01fdfac0d3_1.0.0.2_x86__ze744fdnb0cr8 \ WindowsWuntimeComponent1.winmd没找到。元数据文件
中引用的所有类型都必须是可发现的。
I created a Windows Runtime Component DLL with the following class:
namespace WindowsRuntimeComponent1
{
public ref class Class1 sealed
{
public:
Class1();
static Platform::Type^ GetTypeTest();
};
}
When I consume this from a C# Windows Store application, the application fails the WACK with errors:
The type System.Type referenced by type WindowsRuntimeComponent1.__IClass1Statics in file C:\Program Files\WindowsApps\8c839635-2b37-41ba-a6eb-8e01fdfac0d3_1.0.0.2_x86__ze744fdnb0cr8\WindowsRuntimeComponent1.winmd was not found. All types referenced in metadata files must be discoverable.
The type System.Type referenced by type WindowsRuntimeComponent1.Class1 in file C:\Program Files\WindowsApps\8c839635-2b37-41ba-a6eb-8e01fdfac0d3_1.0.0.2_x86__ze744fdnb0cr8\WindowsRuntimeComponent1.winmd was not found. All types referenced in metadata files must be discoverable.
这篇关于Windows应用认证工具包失败并显示错误 - 元数据文件中引用的所有类型都必须是可发现的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!