You are currently viewing How to Create an App.config file in Visual Basic

How to Create an App.config file in Visual Basic

An App,config file is sued to hold application settings and it may not be created by default in your Visual Basic installation.

If you need to know how to add an App.config file to Your VB.NET project, we have the answer:

Add the File

Right-click your project name in Solution Explorer (not the solution).

Click Add > New Item…

Choose Application Configuration File

  • This will create a file named App.config

Click Add

Store Your API KEY

Use the App.config file (automatically included in most VB.NET desktop projects):

App.config

<configuration>
<appSettings>
<add key=”MailerLiteApiKey” value=”your_actual_api_key_here” />
</appSettings>
</configuration>

<configuration>
<appSettings>
<add key=”MailerLiteApiKey” value=”your_actual_api_key_here” />
</appSettings>
</configuration>