I am trying to use the msdeploy v3.0 to sync an iis website. The site is using .net 4.5 and I am having trouble syncing a brand new server.
Step 1) Create a backup of the website. It looks like it works fine.
msdeploy -verb:sync -source:apphostconfig="XXX",computername=XXX -dest:package=c:\temp\test2.zip,encryptPassword=[pass]
Step 2) Run the deployment package on the destination server. Fails!
msdeploy -verb:sync -source:package=C:\temp\test2.zip,encryptPassword=[pass] -dest:apphostconfig="XXX"
I get the following error when I execute step 2.
Error Message
ERROR_FRAMEWORK_VERSIONS_DO_NOT_MATCH More Information: The versions of the .NET Framework Configuration Provider (mac hineConfig64) are different on the source (2.0.50727.5456) and destination (4.0) . Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FRAMEWORK_ VERSIONS_DO_NOT_MATCH. Error count: 1.
This worked for me:
"I checked the msdeploy.exe.config configuration file and sure enough, the v4.0 runtime was listed first:
A work around to the issue is to move the v2.0.50727 above the v4.0 in the configuration file to force Web Deploy to use the v2.0 CLR."
Taken from:
https://blogs.msdn.microsoft.com/ericparvin/2015/04/03/error_framework_versions_do_not_match/#comment-305
Did you check the application pools? I had the same issue and then I saw that the application pools were using differente .NET version. Or maybe, because you are syncing just the AppHostConfig, the destination App Pool does not exist. Check both.
My MS Deploy version were different, my source I was using V2 and my destination was using V3.
Also check this link to make sure to updated msdeploy.exe.config. infact this solution worked for me http://forums.iis.net/p/1194027/2048869.aspx/1?p=True&t=635030866540089503