0
votes

While trying to publish the website I get the following error what does it mean

Error : Publish Database Setting Source Verification Error: The connection 'cs' in the publish profile has changed from what is currently declared for 'cs (......\Web.config)'. Because of this publishing has been blocked. If this was intended you can disable this check by specifying the value of "True" for the MSBuild property "IgnoreDatabaseSettingOutOfSync." If this was not intended, open the Publish dialog in Visual Studio with this profile to correct the discrepancy. For more information visit http://go.microsoft.com/fwlink/?LinkId=241526

Thanks in advance.

1

1 Answers

0
votes

msbuild: The connection in the publish profile has changed from what is currently declared for

At the time of publishing, .NET assumes that you have placed encoded values in the settings and during publish process, it decodes these values which causes the problem. So, the encoded value of your connection in the publish profile and Web.config does not have same value for database.

To resolve this error, you can try what the error is suggesting: Setting the MSBuild property "IgnoreDatabaseSettingOutOfSync=True"

<PropertyGroup>
  <IgnoreDatabaseSettingOutOfSync>True</IgnoreDatabaseSettingOutOfSync>
</PropertyGroup>

or correct the discrepancy between publish profile and Web.config.