473,395 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

finding the app folder

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
Nov 17 '05 #1
4 3605
you should really be using the Application.UserAppDataPath property for
storing user application data, no the installation directory.

http://msdn.microsoft.com/library/de...apathtopic.asp

HTH

Ollie Riches

"Dica" <ge*****@hotmail.com> wrote in message
news:ue********************@rogers.com...
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

Nov 17 '05 #2

"Ollie Riches" <ol**********@phoneanalyser.net> wrote in message
news:OM**************@tk2msftngp13.phx.gbl...
you should really be using the Application.UserAppDataPath property for
storing user application data, no the installation directory.

http://msdn.microsoft.com/library/de...apathtopic.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?


Ollie Riches

"Dica" <ge*****@hotmail.com> wrote in message
news:ue********************@rogers.com...
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


Nov 17 '05 #3
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/Ma...lyVersions.asp

HTH

Ollie Riches
"Dica" <ge*****@hotmail.com> wrote in message
news:va********************@rogers.com...

"Ollie Riches" <ol**********@phoneanalyser.net> wrote in message
news:OM**************@tk2msftngp13.phx.gbl...
you should really be using the Application.UserAppDataPath property for
storing user application data, no the installation directory.

http://msdn.microsoft.com/library/de...apathtopic.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?


Ollie Riches

"Dica" <ge*****@hotmail.com> wrote in message
news:ue********************@rogers.com...
>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
>
>



Nov 17 '05 #4

"Ollie Riches" <ol**********@phoneanalyser.net> wrote in message
news:eC**************@TK2MSFTNGP15.phx.gbl...
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/Ma...lyVersions.asp

HTH

Ollie Riches
"Dica" <ge*****@hotmail.com> wrote in message
news:va********************@rogers.com...

"Ollie Riches" <ol**********@phoneanalyser.net> wrote in message
news:OM**************@tk2msftngp13.phx.gbl...
you should really be using the Application.UserAppDataPath property for
storing user application data, no the installation directory.

http://msdn.microsoft.com/library/de...apathtopic.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?


Ollie Riches

"Dica" <ge*****@hotmail.com> wrote in message
news:ue********************@rogers.com...
>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
>
>



Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Mr. B | last post by:
I'm writing an app where I'm trying to look for and List all specific file 'types' found. So I point to a specific start top level Folder... and I want to drill down through ALL sub folders to...
8
by: Kai-Mikael Jää-Aro | last post by:
AIUI, there are no global style defaults for HTML tags, i e the W3C does not enforce that e g an <H1> should have a specific type-face, size, and so on, but rather this is decided by the browser. ...
3
by: Lumpierbritches | last post by:
I'm trying to move my images from my main folder to an image folder for the database to store pictures of animals. I borrowed code that works great if I put all the images in the main folder where...
1
by: Mike Turco | last post by:
How do I go about finding the location of the desktop, temp folder, program files folder, my documents, etc. For example, say that I want to programmatically export a table to a file on the...
9
by: Laurent Bugnion | last post by:
Hi, I am wondering what is the best way to find out which ASP.NET sessions are still active. Here is the reason: I have a custom control which can upload files. It saves the files in a folder...
0
by: NSF12345 | last post by:
Iv developed a small program that looks for a file over our network, and copy it to the location of another computer. Im using the "If FileExists("\\oldpc\main share\Folder\file.txt") Then" way of...
17
by: NetworkElf | last post by:
Hi all, I'm writing a service that needs to discover the full directory path for a given locally based share at startup. IOW, I need to have the service running on someserver to take ...
6
by: begum | last post by:
HI everybody; I have problem about selecting files in my main file. I have to find the files whose ending INF. What Can I do?Can anybody help me? using System; using...
5
by: bharathreddy | last post by:
How to find the size of a folder using C# code? step1: Here take the folder which u want to find the size, then pass that folder to the recursive function name FolderSize!. DirectoryInfo...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.