Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2013-01-23
2
Medium Priority
?
774 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

704 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