How To Deploy C# Windows Application (setup File) With Database And How To Manage Connection String On Client Machine
I am creating C# Windows Application in Visual Studio 2015. Question: How to deploy C# Windows Application (setup file) with SQL Server database with database connection string. I
Solution 1:
The easiest way you can do is:
- Save your connection string in app.config is absolutly common
- Compile your Project with Release settings
- Take your .exe file from /bin/release/.. Folder
- The Database should be connected via the connection string. If the database is not connected via network you need to deploy it as well.
- Make sure your clients have .Net Framework installed
If you definitive need a setup.exe which installs your software, you can make a new project which is of type setup-programm. Watch this link for description.
If you don't want your users to see the connectionstring you can use a ConnectionStringBuilder. Save just a part of your connection string to app.config and build the rest via Quellcode. Watch this MSDN-Article.
Post a Comment for "How To Deploy C# Windows Application (setup File) With Database And How To Manage Connection String On Client Machine"