Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My VB app works great in Visual Studio, and I can publish successfully. I have an app.config that is read successfully, setting connection strings.

My problem/confusion. It publishes to a local folder (set in the publish dialogue), and creates a setup file. After I run this setup file, the same exe (called setup.exe) successfully runs my application. I can rename this file and it will still run. There are very few files here. It also publishes to a bin folder in another location, where the app.config and various reference files seem to live.

My goal: I want to distribute this application on a server in multiple locations (various customers), where I can change the app.config settings to point to different databases. The app doesn't seem to run without running setup first. How can I distribute this application as needed? I was able to write the app, but can't share it out!

What I have tried:

I've published the app successfully, but can't understand how to distribute it.
Posted
Updated 30-Jan-24 6:07am
Comments
PIEBALDconsult 30-Jan-24 15:58pm    
Stick it on a floppy disc.

Well, here are some suggestions which can be adopt to achieve the goal. These suggestions should be adapted to align with your specific requirements and the chosen deployment method.

The customization of configuration settings or connection strings for individual customers can be achieved by storing them in a database, which can then be loaded based on specific customer criteria. Users or administrators have the flexibility to manually modify these settings through any interface.

Another approach for configuring settings for different customers involves creating distinct script files that modify the app.config file according to the specific requirements of each customer. This facilitates easy switching between configurations.

In terms of deployment, utilize the ClickOnce deployment technique to distribute the application with configured settings. This ensures that users can run the application without the need for installation. These deployment configurations can be further fine-tuned in the ClickOnce deployment settings.
 
Share this answer
 
ClickOnce was mentioned above. I have written an in depth article and helper: Silent ClickOnce Installer for Winform & WPF in C# & VB[^] (there is also a.Net core version and article as well). The key benefit of doing it this way is that you can push updates to a website and the helper will auto detect and install the update for you.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900