c# - StreamReader code raises exception after converting it to DesktopBridge APP -


i have small wpf application uses below code. reads said file display content.

using (streamreader streamreader = new streamreader(@"terms\license.txt", encoding.utf8))           { .... } 

this code works correctly in wpf application. when ... use desktopbridge convert wpf appx , installed .appx. same code throws exception.

exception info: system.io.directorynotfoundexception.

any clue ? assistance ?

regards

please see preparation guide desktop bridge apps on msdn , make appropriate compatible code change app:

https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-prepare

your app uses current working directory. @ runtime, converted app won't same working directory specified in desktop .lnk shortcut. need change cwd @ runtime if having correct directory important app function correctly.

thanks, stefan wick - windows developer platform


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -