Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. 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?)

for the lines

using Windows.Storage; 
using Windows.ApplicationModel.ExtendedExecution;
like image 847
user9413194 Avatar asked Aug 31 '25 10:08

user9413194


1 Answers

That's because you're missing these .dll

The recommended steps to get access to UWP APIs are listed in the dedicated blog post on Windows Blog. 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.

For more details, you can check: How do I get access to Windows.Storage namespace?

like image 89
Jessie Zhang -MSFT Avatar answered Sep 04 '25 15:09

Jessie Zhang -MSFT