Deploying VB.NET VS 2008 with a configuration file

Posted on 2009-02-17
Last Modified: 2012-08-13
I have migrated successfully (in development mode) a VB6 application to VS.NET 2008.
The application uses an INI file which is read on startup to obtain configurable parameters.
The old VB6 application simply looked for the INI file in the folder where the application resided, and read the parameters. On installation, it was normally installed in C:\Program Files\'applicationname'
This was fine as it was easy to create a new folder, copy the aplication/INI file to that location, configure the INI file, and off you go.
This was important as multiple copies needed to reside on the workstation, to allows the program to run with different parameters against different database etc.
This is my first deployment of the .NET application.
How can I mirror the functionality of the VB6 deployment ?
Question by:josephwalsh
    LVL 69

    Expert Comment

    by:Éric Moreau
    LVL 5

    Author Comment

    The links provided were very interesting.
    The INI file I use is read olny to get the parameters, and I had created my own Function to read the INI file passing appnam/key/INI file name.
    I will probably move to using the xml config file.

    The nub of the problem. When I install the app it installs it on the Start/Programs area. In VB6 it would have been installed in the C:\Program Files\appname folder. I could then copy the program and INI file to a different folder for separate execution. The install creates the following files :
    appname.exe.config (Ihave started using configuration settings)
    Do I need to copy all files to the new folder in order for the app. to run in the new folder ?
    Will there be any issues ?
    LVL 69

    Accepted Solution

    You should move to the app.config file which is really the .Net way of doing.

    I have no clue on what .cdf-ms is.

    Yes the other files should be copied.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    760 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

    8 Experts available now in Live!

    Get 1:1 Help Now