This project is read-only.


Download the .msi from AppConfig Code Generator and double-click on it.
If a previous version is installed on the computer, unsinstall it before.



Set the Custom Tool property of the app.config file to "AppConfigCodeGenerator".


Set the Custom Tool property of the app.config file to "AppConfigCodeGeneratorVB".
Set the Custom Tool Namespace.
I don't know why but the generated file is not added to the VB.NET project. If anybody has an idea...

Default value

The application handle default values for appSettings:

<add key="myAppSettings" value="myValue" default="defaultValue" />


<add key="myAppSettings" value="myValue" default="" />

Of course, the default attribute is not mandatory.

Type definition

The application handle type definition for appSettings;

<add key="myAppSettings" value="1" type="int" />

String if the default type.

The following types are supported:
  • bool
  • char
  • datetime
  • decimal
  • double
  • float
  • int
  • uint

The type can be an array:
  • bool[]
  • char[]
  • datetime[]
  • decimal[]
  • double[]
  • float[]
  • int[]
  • uint[]

You can use the default and type features in the same appSetting line.

In order to use the default and/or type features, you have to modify your project file:
Add this line in the .csproj/.vbproj file:

<UsingTask TaskName="AppConfigCodeGenerator.AppConfigCleanTask" AssemblyName="AppConfigCodeGenerator, Version=, Culture=Neutral, PublicKeyToken=8ca6685cbc7f7a26"/>

Then add this line:

<AppConfigCleanTask FileName="$(TargetPath).config" />

In the following tag:
<Target Name="AfterBuild">

This lines indicates a MSBuild Task to use. This task just remove the default attribute in the [ApplicationName].config file in the output directory, otherwise the file can't be used.

Last edited Apr 9, 2011 at 4:39 PM by laedit, version 4


No comments yet.