[英]Visual Studio 2015 (Community) designer shows NullReferenceException for blank Universal App
[英]Visual Studio 2015 Blank App (Universal Windows): CS0731
我正在嘗試創建一個“通用Windows”項目。 為此,我使用了Visual Studio 2015 Blank應用程序(通用Windows)模板。
我現在得到以下編譯錯誤:
CS0731程序集“Windows”中類型“Windows.Foundation.IAsyncOperation`1”的類型轉發器導致一個循環
在以下來源中:
string filename = "SampelData.json";
var path = Windows.ApplicationModel.Package.Current.InstalledLocation;
Windows.Storage.StorageFile file = await path.GetFileAsync(filename);
string jsonResult = await Windows.Storage.FileIO.ReadTextAsync(file);
確切地說,為await path.GetFileAsync(filename)
顯示的故障await Windows.Storage.FileIO.ReadTextAsync(file).
分析錯誤消息微軟沒有幫助我: CS0731
更新
至於由負載元數據下的錯誤引起的錯誤的X. 程序集“程序集”中類型“類型”的類型轉發器會導致循環
只有在導入的元數據格式不正確時才會出現此錯誤。 只有C#源才能發生這種情況。
我是否通過刪除chache文件夾內容並運行devenv /resetuserdata
。
不幸的是,沒有成功
更新2
仍然沒有解決方案,文件處理對應於Microsoft文檔,請參閱https://msdn.microsoft.com/en-us/library/windows/apps/mt185401.aspx 。
我這里實際上想加載樣本數據。 但我目前還開發了用於提供數據的WebService。 我讓我的示例數據只是關於這個WebService部署。 這是但我認為沒有令人滿意的解決方案。
麻煩已經解決了Visual Studio 2015的更新2。自安裝更新以來,至少問題不再包括在內。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.