Reputation: 2280
I have this code in startup for a UWP app to access local data
StorageFolder appDataFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
This works fine in debug but appDataFolder
is null in release mode.
Why is this so? How do I access local data in release mode?
Upvotes: 0
Views: 518
Reputation: 2280
I got the answer from UWP run in Release Mode gives “'ApplicationData' does not exist in the current context”
To run in release mode, in properties/debug uncheck Net Native tool chain and uncheck Optimize code
Upvotes: 1