Solved

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

Posted on 2013-01-23
2
690 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now