Click here to Skip to main content
12,702,455 members (37,178 online)
Rate this:
Please Sign up or sign in to vote.
See more: WinXP VB Windows DirectX VB.NET , +
I made a program in VB.Net that acts as a VU meter and it shows the value on a progress bar(it is using My.Settings functions), and then I updated it with some code that is connected with DirectX sound. It works perfectly, but when I try to make a copy of the built program in another folder, it says that the configuration file is missing, when I copy the configuration file in the same folder with the program, it works. This means that I can't give the program to someone else, unless I give the configuration file as well ?
I had a problem with the Frameworks, but I figured it out, I just added this code to the configuration file:
<startup useLegacyV2RuntimeActivationPolicy="true">
   <supportedRuntime version="v4.0"/>

Maybe that messed it up?

On other programs, the configuration file gets saved in the "Application Data" folder (%appdata%), (C:\Documents And settings\USER\Application Data)in XP.
Posted 5-Jan-13 13:17pm
Updated 5-Jan-13 14:03pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

According to MSDN:

Application configuration files must be installed in the same location as the application's application manifest.[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

But how other programs work when the configuration folder isn't in the same folder with the program ?
jibesh 5-Jan-13 21:29pm
Please use the Comment Widget to post your comment do not use the solution field.

If your programs uses AppConfig then it MUST be copied along with your programs otherwise it wont work as expected. In other cases the exception was handled and the program uses the default values and not the Application Configuration data.

In other cases most of the application uses its own configuration files in the form of Xml,Database,text file etc.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 5 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100