Plase, help me, I have the following line of code in C# inside some async method and I use Universal Windows Platform (Windows 10 SDK 10.0.14393):
var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/HamburgerMenuItems.json"));
The problem is this exception: System.IO.FileNotFoundException occurred in mscorlib.ni.dll.
Visual Studio shows me, that the file is inside the Assets folder and the file is ok, because it opens normally (it is very short json file). What can be the problem or what is solution for this problem?
this image shows, that the file is inside the Assets folder
Change the BuildAction
to Content
and Copy to Output Directory
from Do not copy
to Awayls
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With