finding the app folder

  • Thread starter Thread starter Dica
  • Start date Start date
D

Dica

i need to create a config.xml file for my app. i'd like it to show up under
the installation folder (user selected). is there a way to do this?

tks
 
Ollie Riches said:
you should really be using the Application.UserAppDataPath property for
storing user application data, no the installation directory.

http://msdn.microsoft.com/library/d...formsapplicationclassuserappdatapathtopic.asp

HTH

absolutely. thanks ollie.

something i noticed since making the change, though. whenever i run the
application, a new folder is created in the user\application data folder
with the current build version. so, everytime i run the app, my app tries to
find the config file, fails to find it, and i then have to re-enter all the
info again. i suppose i could just hard code in a fixed folder to save the
file in until i'm ready to go to release, but is there a better way around
this?
 
change the AssemblyVersion attribute in the assemlbyinfo.cs file from
[assembly: AssemblyVersion("1.0.*")] to a fixed number and it will stop
creating a new folder each time.

Using [assembly: AssemblyVersion("1.0.*")] in the assemblyinfo.cs file
creates a new version for each build and hence a new folder with the version
in it under the UserAppDataPath property value.

check out the following for more info:

http://www.codeproject.com/dotnet/ManagingAssemblyVersions.asp

HTH

Ollie Riches
 
Ollie Riches said:
change the AssemblyVersion attribute in the assemlbyinfo.cs file from
[assembly: AssemblyVersion("1.0.*")] to a fixed number and it will stop
creating a new folder each time.

perfect. thanks again, ollie.
Using [assembly: AssemblyVersion("1.0.*")] in the assemblyinfo.cs file
creates a new version for each build and hence a new folder with the version
in it under the UserAppDataPath property value.

check out the following for more info:

http://www.codeproject.com/dotnet/ManagingAssemblyVersions.asp

HTH

Ollie Riches


Dica said:
http://msdn.microsoft.com/library/d...formsapplicationclassuserappdatapathtopic.asp

absolutely. thanks ollie.

something i noticed since making the change, though. whenever i run the
application, a new folder is created in the user\application data folder
with the current build version. so, everytime i run the app, my app tries
to
find the config file, fails to find it, and i then have to re-enter all
the
info again. i suppose i could just hard code in a fixed folder to save
the
file in until i'm ready to go to release, but is there a better way around
this?
 
Back
Top