dotnet cli - How do you store user app data in .net core console app -


my scenario i'm building small cli app want able store user specific data in kind of user local cache.

i guess i'm looking similar environment.specialfolder.applicationdata path, in dotnet core , cross platform friendly.

i know not same, solved storing data in application folder so:

var userdatapath = path.combine(appcontext.basedirectory, "userdata.json"); 

of course can take subfolder of appcontext.basedirectory.


Comments

Popular posts from this blog

c# SetCompatibleTextRenderingDefault must be called before the first -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -

c++ - Fill runtime data at compile time with templates -