Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: WinXP 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 12:17pm
Edited 5-Jan-13 13:03pm
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 at 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.
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.[^]

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 398
1 CPallini 333
2 George Jonsson 270
3 OriginalGriff 159
4 Prasad Khandekar 135
0 OriginalGriff 4,613
1 CPallini 3,340
2 Sergey Alexandrovich Kryukov 2,771
3 George Jonsson 2,254
4 Gihan Liyanage 2,020

Advertise | Privacy | Mobile
Web04 | 2.8.140905.1 | Last Updated 5 Jan 2013
Copyright © CodeProject, 1999-2014
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