简体   繁体   English

错误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?)

I want to run the Xamarin project and did all the updates. 我想运行Xamarin项目并进行所有更新。 When I run the project I get the following error 当我运行项目时,出现以下错误

The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?) 找不到类型或名称空间名称“ Windows”(是否缺少using指令或程序集引用?)

for the lines 为线

using Windows.Storage; 
using Windows.ApplicationModel.ExtendedExecution;

That's because you're missing these .dll 那是因为您缺少这些.dll

The recommended steps to get access to UWP APIs are listed in the dedicated blog post on Windows Blog . Windows博客上的专用博客文章中列出了建议的访问UWP API的步骤。 Basically you can take two approaches: add the references to UWP dlls and winmd files manually or use the UwpDesktop NuGet package that will take care of this for you automatically. 基本上,您可以采用两种方法:手动添加对UWP dll和winmd文件的引用,或使用UwpDesktop NuGet软件包将自动为您解决此问题。

For more details, you can check: How do I get access to Windows.Storage namespace? 有关更多详细信息,您可以检查: 如何访问Windows.Storage命名空间?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误 CS0246:找不到类型或命名空间名称“Npgsql”(您是否缺少 using 指令或程序集引用?) - error CS0246: The type or namespace name 'Npgsql' could not be found (are you missing a using directive or an assembly reference?) 错误 CS0246:找不到类型或命名空间名称“StreamingContext”(是否缺少 using 指令或程序集引用?) - Error CS0246: The type or namespace name 'StreamingContext' could not be found (are you missing a using directive or an assembly reference?) 错误 CS0246:找不到类型或命名空间名称“IWebHostEnvironment”(您是否缺少 using 指令或程序集引用?) - error CS0246: The type or namespace name 'IWebHostEnvironment' could not be found (are you missing a using directive or an assembly reference?) 错误 CS0246:找不到类型或命名空间名称“BannerPosition”是否缺少 using 指令或程序集引用? - error CS0246: The type or namespace name 'BannerPosition' could not be found are you missing a using directive or an assembly reference? 错误 CS0246 找不到类型或命名空间名称“CreateRandomAnswersForKey”(您是否缺少 using 指令或程序集引用?)? - Error CS0246 The type or namespace name 'CreateRandomAnswersForKey' could not be found (are you missing a using directive or an assembly reference?)? CS0246:找不到类型或命名空间名称'MySql'(您是否缺少using指令或程序集引用 - CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference CS0246:找不到类型或名称空间名称“ Employee”(您是否缺少using指令或程序集引用?)? - CS0246: The type or namespace name 'Employee' could not be found (are you missing a using directive or an assembly reference?)? CS0246 找不到类型或命名空间名称“ErrorViewModel”(您是否缺少 using 指令或程序集引用?) - CS0246 The type or namespace name 'ErrorViewModel' could not be found (are you missing a using directive or an assembly reference?) C# 错误:错误 CS0246 找不到类型或命名空间名称“”(您是否缺少 using 指令或程序集引用?) - C# Error: Error CS0246 The type or namespace name '' could not be found (are you missing a using directive or an assembly reference?) C# 错误 CS0246 找不到类型或命名空间名称“Socket”(您是否缺少 using 指令或程序集引用) - C# error CS0246 The type or namespace name 'Socket' could not be found (are you missing a using directive or an assembly reference)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM