Solved

ClickOnce Deployment placing an .ini in the %APPDATA% directory

Posted on 2013-01-23
2
699 Views
Last Modified: 2013-02-13
I have a vb.net desktop application that is deployed with clickonce.   I have recently added an ini file to for some generic info that I need to read during various times.   How do I have the 'ini' file automatically placed in the appdata folder at installation.

I have looked in the Publish Properties and do see where.

Thanks.
0
Comment
Question by:browe68
2 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 38812045
You should you .config files instead of .ini files. They have a lot of advantages over .ini files.

1. They are the standard way of working with such files in .NET.

2. They are also used by some features of the framework, so you might need one anyway. Having to deploy one file instead of 2 makes things easier, specially since they are automatically included in a ClickOnce application.

3. They can be created and managed easily through the Settings tab of the Project's Properties window.

4. They are typed, so you cannot, for instance, enter an invalid date in a date setting.

5. When a setting is defined as a User settings, the framework automatically takes care of moving it to the AppData folder.

6. The framework also takes care of keeping separate setting values for each user when many users use the same computer.

7. Many users will shy away from the XML files that contains the settings, so there is less risk that someone go in there and type an invalid value.

8. There are mechanisms built into the framework that enable you to easily change the value of a setting if you need to do so while updating the application.

You can learn more at http://msdn.microsoft.com/en-us/library/a65txexh(v=vs.100).aspx
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38812233
You can click on Application Files button on Publish tab and select Include against that file. App.config is preferred approach though.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question