I am still trying to get my head around MSBuild things. Currently I am fiddling around with deploying via powershell script using the generated scripts from the PackageWeb-Nuget-Package (video demo). I have been trying that out for a few days now and it seemed to work. But "suddenly" the connection string in the generated web.config is tokenized and instead of the connection string in question I see
connectionString="$(ReplacableToken_DefaultConnection-Web.config Connection String_0)
I wrote "suddenly" because I could not link this (for me new) behaviour to anything I had done in the previous hours.
So to sum it up: The deployment from package is working fine, also the correct config transformation is being applied, but I end up with this tokenized connection string.
I realize that I can fix this if I insert
<AutoParameterizationWebConfigConnectionStrings>false</AutoParameterizationWebConfigConnectionStrings>
into a PropertyGroup (I just put it into the generated targets-file that the Nuget-Package creates)
However I really dislike this, having to insert this additional value into each project that might need it; especially because I did not know I need this adjustment in the first place. Yesterday it worked and I did not have this extra line inserted into any projects- or targets-file.
So I was hoping that maybe someone knows an extra switch, trick or setting that might have an additional influence on how that is working, too.
AutoParameterizationWebConfigConnectionStrings=false
is still part of my deployment process; though I have not run into any problems with that, besides esthetically, I would also still be very interested if this can be circumvented in any way. – Gratifymsbuild
- that way you override already existing properties in your proj-files or add new ones that you need (just likeAutoParameterizationWebConfigConnectionStrings
) hope this helps you ;) (example: https://mcmap.net/q/76666/-how-do-i-pass-a-property-to-msbuild-via-command-line-that-could-be-parsed-into-an-item-group) – GratifyAutoParameterizationWebConfigConnectionStrings
andDisableAllVSGeneratedMSDeployParameter
for publishing Web Deploy Packages from Visual Studio 2013. Where exactly do you put these? In thecsproj
file? I've tried that and it gives an error. – Cask.pubxml
that is created inProject Folder/Properties/PublishProfiles
when you create a profile in the Publish->Web Deploy Package dialog. There wasn't an error after putting it there. – Cask