2016-08-04 8 views
2

Plaseに例外が見つかりません、私を助けて、私はいくつかの非同期メソッド内のC#のコードの次の行を持っていると私はユニバーサルのWindowsプラットフォーム(Windowsの10 SDK 10.0.14393)を使用します。ファイルユニバーサルのWindowsプラットフォーム

var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/HamburgerMenuItems.json")); 

問題はこの例外です。mscorlib.ni.dllでSystem.IO.FileNotFoundExceptionが発生しました。

Visual Studioでは、ファイルがAssetsフォルダ内にあり、ファイルが正常に開くため(非常に短いjsonファイルです)、ファイルが正常であることを示しています。何が問題になるか、またはこの問題の解決策は何ですか?

this image shows, that the file is inside the Assets folder

答えて

3

変更AwaylsからDo not copyからContentCopy to Output DirectoryBuildAction

enter image description here

関連する問題