Home >Common Problem >Windows.Storage namespace not found error on Windows PC [Fixed]
Visual Studio users, mainly those working on portable library class projects have come up with this "Windows". Storage namespace not found" error prompts, they are received in studio. This issue seems to be due to the missing of a specific dll file on the system. In some cases, the same may appear if the variable is declared wrong problem. So without wasting time, jump into the main solution and solve the problem yourself.
You have to add the Reference to the Runtime.WindowsRuntime.dll file and test it.
1. Open the project in Visual Studio if it is not already open.
2. Then, click "View" on the menu bar and click "Solution Explorer" to open Solution Explorer in VS.
3. On the Solution Explorer page, right-click the References tab and click Add Reference... to access the tab.
4. Now, in the Citation Manager window, go to the Browse tab.
5. Then, Click "Browse..." to browse to the DLL file.
6. Next go to this location –
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1
7 . Find the DLL file. Select "All files" from the drop-down list.
8. Select the "System.Runtime.WindowsRuntime.dll" dll file.
9. Then, click "Add" to add the dll file to your project.
After adding the DLL file, try to Test the build on your computer. The problem will not reoccur.
This is another common mistake that programmers often make. You must make the variable Windows. Storage.ApplicationData is declared as a global variable on the machine.
So, just include it in your code –
global::Windows.Storage.ApplicationData
Then, run all tests using build. If error still exists, you can use the Global Object Browser after the next fix.
There is another tool available for identifying the Object Browser.
1. Load the build in Visual Studio.
2. Then, click "View" from the menu tab and select "ObjectBrowser" to open it.
You can also use the Ctrl Alt J keys at the same time.
3. Now, set "Browse" to "All Components" from the drop-down list.
will load an extensive list of components.
4. Select "System.Runtime.WindowsRuntime.dll" carefully.
4. Next, click the "Add Reference to Selected Item" icon in the Object Browser to add it to your code.
This way you can easily add reference objects to your project library.
The above is the detailed content of Windows.Storage namespace not found error on Windows PC [Fixed]. For more information, please follow other related articles on the PHP Chinese website!