Windows应用认证工具包失败并显示错误 - 元数据文件中引用的所有类型都必须是可发现的 [英] Windows App Certification Kit Fails with error - All types referenced in metadata files must be discoverable

查看:66
本文介绍了Windows应用认证工具包失败并显示错误 - 元数据文件中引用的所有类型都必须是可发现的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下类创建了一个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没找到。元数据文件
中引用的所有类型都必须是可发现的。

解决方案

Hi Ike,


<看起来在包文件中找不到你的RuntimeComponent,我想知道你是如何创建它的,因为Windows运行时组件不是DLL,而是创建一个.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.

解决方案

Hi Ike,

Looks like your RuntimeComponent cannot be found on the package file, I would like to know how you create this, because Windows Runtime Component does not a DLL, it create a .winmd file instead.

--James


这篇关于Windows应用认证工具包失败并显示错误 - 元数据文件中引用的所有类型都必须是可发现的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆