[英]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.