xunkong / xunkong

记录旅途中发生的事
https://xunkong.cc
MIT License
930 stars 41 forks source link

启动游戏功能无法使用 #36

Closed TheTychoStar closed 2 years ago

TheTychoStar commented 2 years ago

提示InvalidCastException。 error

log文件内容: [16:15:30.909] [INF] Xunkong.Desktop.Services.BackgroundService Start to start game.

[16:15:30.915] [INF] Xunkong.Desktop.Services.BackgroundService Exe path is C:\Program Files\Genshin Impact Chn\Genshin Impact Game\YuanShen.exe.

[16:15:30.915] [ERR] Xunkong.Desktop.ViewModels.SettingViewModel Start game in app. System.InvalidCastException: Specified cast is not valid. at WinRT.IObjectReference.As[T](Guid iid) at Windows.ApplicationModel.Package.Make_objRef_globalWindows_ApplicationModel_IPackage8() at Windows.ApplicationModel.Package.get__objRef_global__Windows_ApplicationModel_IPackage8() at Windows.ApplicationModel.Package.get_InstalledPath() at Xunkong.Desktop.Services.BackgroundService.StartGameAsync() at Xunkong.Desktop.ViewModels.SettingViewModel.StartGameAsync()

Scighost commented 2 years ago

读取保存在应用内的设置时出现了错误,但是和框架有关的问题我没法解决,尝试重装吧。 另外,字体问题请看 #37