XamlCompiler 错误 WMC1006:无法解析程序集或 Windows 元数据文件“Microsoft.Win32.Registry.dll" [英] XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'Microsoft.Win32.Registry.dll'

查看:23
本文介绍了XamlCompiler 错误 WMC1006:无法解析程序集或 Windows 元数据文件“Microsoft.Win32.Registry.dll"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Windows SDK 10.1.16299.15 将我的 UWP 项目升级到 Fall Creator Update.

I upgraded my UWP Project to Fall Creator Update with the Windows SDK 10.1.16299.15.

当我编译或创建商店包时,我得到:

When I compile or create a Store Package I get:

C:\Users...\Visual Studio 2017\Projects\FileRenamer\Get.the.solution.FileRenamer.App\Get.the.solution.FileRenamer.App.csproj:XamlCompiler 错误 WMC1006:无法解析程序集或 Windows元数据文件Microsoft.Win32.Registry.dll"3>C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets(263,5): Xaml Internal Error error WMC9999: Type Universe cannot解析程序集:Microsoft.Win32.Registry,Version=0.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a.

C:\Users...\Visual Studio 2017\Projects\FileRenamer\Get.the.solution.FileRenamer.App\Get.the.solution.FileRenamer.App.csproj : XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'Microsoft.Win32.Registry.dll' 3>C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets(263,5): Xaml Internal Error error WMC9999: Type universe cannot resolve assembly: Microsoft.Win32.Registry, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.

我从未引用过 Microsoft.Win32.Registry.dll,所以我认为这是 Windows SDK 错误?

I never referenced Microsoft.Win32.Registry.dll so I think it's Windows SDK Bug?

我在哪里可以报告这样的错误以及如何修复它?

Where can I report such a Bug and how can I fix it?

PS:我的 Windows 机器获得了 Fall Creators 更新,Visual Studio 也是最新的.

PS: My Windows machine got the Fall Creators update and Visual Studio is up to date too.

推荐答案

我之前遇到了同样的问题,只是通过从解决方案文件夹中删除 .vs 文件夹来设法解决它.

I was struggling with the same issue earlier and just managed to fix it by removing the .vs folder from the solution folder.

请注意,此文件夹默认隐藏,因此您需要启用从文件资源管理器中显示隐藏项目.

Note this folder is hidden by default, so you will need to enable showing hidden items from File Explorer.

在下一个 SDK 中出现正确修复之前,这是 Visual Studio 团队提供的解决方法.

Here's a workaround from the Visual Studio Team before a proper fix comes out in the next SDK.

Windows 团队调查了这个问题,就像我们怀疑它是 SDK 的一个已知问题,我们已经计划在下一个版本中解决这个问题(我们无法将其纳入 Fall Creators Update SDK).目前,不幸的是,您需要确保在同一解决方案中打开的所有项目的 TargetPlatformMinVersion 都相同.

The Windows team investigated this issue, and like we suspected it was a known issue with the SDK that we already plan to address for the next release (we could not get this into the Fall Creators Update SDK). For now, unfortunately, you will need to make sure that the TargetPlatformMinVersion of all of the projects you have open in the same solution are identical.

这篇关于XamlCompiler 错误 WMC1006:无法解析程序集或 Windows 元数据文件“Microsoft.Win32.Registry.dll"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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