Solved

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

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 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

21 Experts available now in Live!

Get 1:1 Help Now