狀況:
部署後在web.config的連線字串會變成$(ReplacableToken_連線字串名稱-Web.config Connection String_0)
解法:
在專案的csproj檔,在各組態的<PropertyGroup>都加入
<AutoParameterizationWebConfigConnectionStrings>False</AutoParameterizationWebConfigConnectionStrings>
來源:
https://docs.microsoft.com/zh-tw/aspnet/web-forms/overview/deployment/visual-studio-web-deployment/troubleshooting#format-of-the-initialization-string-does-not-conform-to-specification-starting-at-index-0