If you utilize Visual Studio in your Windows 11 or Windows 10 pc, whereas engaged on a transportable library class undertaking you could get an error immediate stating Windows.Storage Namespace not found. In this submit, we offer essentially the most relevant fixes to this error.
For newcomers, Windows.Storage namespace is a group of Windows APIs that provides lessons for managing information, folders, and utility settings and ought to be famous that the System.Windows.Storage is not the identical. If the error message reads System.Windows.Storage (a part of .NET & the foundation namespace for WPF), it’s completely different from Windows.Storage (root namespace for WinRT, the first API for UWP apps). That mentioned, you could encounter the error at hand because of the following causes.
- A specific DLL file is lacking out of your system.
- A flawed variable declaration.
- You are utilizing the thing browser incorrectly.
- You have not included the reference to the correct bundle.
Windows.Storage Namespace not found
If you get Windows.Storage Namespace not found error immediate whereas engaged on a transportable library class undertaking in Visual Studio in your Windows 11/10 pc, then the steered fixes introduced beneath ought to provide help to resolve the problem in your system.
- Declare the variable globally in your code
- Use the Visual Studio Object Browser appropriately
- Manually add the System.Runtime.WindowsRuntime.dll file to your undertaking
Let’s shortly check out the outline of those fixes. Before you proceed, to rule out the potential for a lacking DLL file, you’ll be able to re-register all DLL information in your system. If you’ll be able to determine the lacking DLL file (on this case System.Runtime.WindowsRuntime.dll), supplied it’s native to the Windows OS, you’ll be able to head over to Winbindex and obtain a recent copy of the file and place it precisely in the identical folder as the unique.
1] Declare the variable globally in your code
This is a standard mistake programmers usually commit or most definitely hindsight. In the case of Windows.Storage Namespace not found error you could encounter in Visual Studio on PC; you must declare the variable Windows.Storage.ApplicationData as a world variable in your pc. To do that, embody the road beneath in your code and run all of the checks with the construct.
If the error remains to be triggered, then you could use the worldwide object browser as described within the subsequent repair.
2] Use the Visual Studio Object Browser appropriately
By default, the thing browser is ready to All Components, so you’ll want to ensure you’re utilizing the thing browser appropriately. Do the next:
- Load up the construct in Visual Studio.
- Next, click on on View from the menu tab.
- Select Object browser from the menu. Alternatively, you’ll be able to press the Ctrl+Alt+J key combo.
- Next, set the Browse to All Components from the drop-down listing.
- Now, from the intensive listing of parts masses up, choose the specified Component.
- Next, faucet on the Add to References in Selected Project icon within the Object browser so as to add it to the code.
- Repeat the steps above to simply add every other reference object you need to the undertaking library.
3] Manually add the System.Runtime.WindowsRuntime.dll file to your undertaking
The error in view might be triggered when you’ve got not added the reference to the correct bundle. In this case, to resolve the problem, you’ll be able to manually add the System.Runtime.WindowsRuntime.dll file to your undertaking by following these steps:
- Open Visual Studio.
- Go to Solution Explorer.
- Next, right-click on References.
- Select Add Reference from the context menu.
- On the left aspect of the Reference Manager, click on on the Browse tab.
- Next, click on the Browse button on the correct of the window and navigate to the listing path beneath:
C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETCorev4.5
- At the placement, choose All information from the drop-down listing.
- Now, discover and choose the System.Runtime.WindowsRuntime.dll file.
- Finally, click on the Add button so as to add the DLL file to your undertaking.
Now learn: IntelliSense not working in VS Code
What does Windows Storage DLL do?
The Windows.Storage DLL file, also referred to as Microsoft WinRT Storage API, is often related to the Microsoft Windows Operating System. It is a vital part, which ensures that Windows applications function correctly. Essentially, DLL information are essential to launch a program though they’re not used steadily as editorial information. In any case, if the DLL file is corrupted or lacking out of your system, you possibly can obtain a DLL file lacking error message.
How do I exploit Windows Storage?
In Windows 11/10 if configured or arrange, Storage Spaces sometimes retailer two copies of your information so if one in every of your drives fails, you continue to have an intact copy of your information. So, you should use Storage Spaces to group two or extra drives collectively in a storage pool after which use capability from that pool to create digital drives known as storage areas.