-1

I would like to take a serialized file and save it to my recourses folder in project.

My reason for doing this (maybe there's a better way) is I have a published exe (single executable file) for the program that runs and when it creates a serialized file I don't want it to save it to desktop. I need to somehow save it to my exe without going outside of it.

Any advice on how I could do this?

Virophage
  • 17
  • 6
  • The recommended place to save "data" for an application is a AppData location: https://learn.microsoft.com/en-us/windows/apps/design/app-settings/store-and-retrieve-app-data .... https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.application.localuserappdatapath?view=windowsdesktop-6.0 – Colin Smith Dec 04 '21 at 04:42
  • If you want the settings/data to roam with the user when the login elsewhere then: https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.application.userappdatapath?view=windowsdesktop-6.0 ... or...if its data all users share....https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.application.commonappdatapath?view=windowsdesktop-6.0 – Colin Smith Dec 04 '21 at 04:50
  • Save it to one of the _App Data_ folders. If you want it to be nearly undiscoverable, save it to _Isolated Storage_ – Flydog57 Dec 04 '21 at 05:08
  • @CSmith thanks that's a good suggestion – Virophage Dec 04 '21 at 17:07
  • @Flydog57 also great, thanks; I haven't heard of the isolated storage folder. I may have to look into that. ig I could also just create a hidden directory in the appdata folder. I just hope I don't need admin rights to right to appdata folder. – Virophage Dec 04 '21 at 17:08