I want to have the user set the server, port, user id and password at installation. I have changed the connection string in the config file to:
<add name="SQLConnect.My.MySettings.HouseholdInventoryConnectionString" connectionString="Data Source=[SERVER_PROP],[PORT_PROP];Initial Catalog=HouseholdInventory;Persist Security Info=True;User ID=[USERNAME_PROP];Password=[PASSWORD_PROP];Encrypt=true;TrustServerCertificate=true" providerName="System.Data.SqlClient" />
and then uploaded it to the files and folders of the installer file. I also created a new dialog with these four parameters. The dialog seems to work fine. However, I can't get the config file to update properly. I've tried every combinatgion I can think of and the best I've gotten is to uncheck everything except the add in connection strings. On this item I have update if found but add is unchecked. If I have attributes, then they are added after the connection string and the connection string is unchanged. If I don't have attributes, then the connection string is unchanged but nothing is added.
So, all I want to do is replace the [property-PROP] with the correct value and leave everything else alone. How do I do that?
FOLLOW US
Get the latest news in Application Packaging