c# - Updating my application avoids me to get my old files -


i developing desktop application using c# winforms. creating files , folders on directory application runs at. deploying application using click once approach. problem everytime update application creates new root folder run at. , won't able use files anymore. workarounds that? thinkin of creating folder @ "c:\mycompany\myapplication" reachable , breakable. happy hear other advises or knowledges favor me :)

you should store files , folders in user's application data folder. can path folder statement:

string appdatapath = system.environment.getfolderpath(environment.specialfolder.applicationdata); 

you should create folder in path application , store there.

there of course other solutions, point should not use application folder, since indeed change everytime publish, and bad practice several other reasons (data backup, etc.).


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -