错误 CS0246 找不到类型或命名空间名称 'Windows'(是否缺少 using 指令或程序集引用?)
Error CS0246 The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?)
我想 运行 Xamarin 项目并完成所有更新。当我 运行 项目时,我得到以下错误
The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?)
对于行
using Windows.Storage;
using Windows.ApplicationModel.ExtendedExecution;
那是因为您缺少这些 .dll
Windows Blog 上的专门博客 post 中列出了访问 UWP API 的推荐步骤。
基本上您可以采用两种方法:手动添加对 UWP dll 和 winmd 文件的引用,或使用 UwpDesktop NuGet 包自动为您处理。
更多详情,您可以查看:
我想 运行 Xamarin 项目并完成所有更新。当我 运行 项目时,我得到以下错误
The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?)
对于行
using Windows.Storage;
using Windows.ApplicationModel.ExtendedExecution;
那是因为您缺少这些 .dll
Windows Blog 上的专门博客 post 中列出了访问 UWP API 的推荐步骤。 基本上您可以采用两种方法:手动添加对 UWP dll 和 winmd 文件的引用,或使用 UwpDesktop NuGet 包自动为您处理。
更多详情,您可以查看: