简体   繁体   中英

Web Deployment Task Failed - FRAMEWORK VERSIONS DO NOT MATCH

When I try to use web deploy to publish my app. I get this error

Web deployment task failed. (The versions of the .NET Framework Configuration Provider (machineConfig32) are different on the source (4.0) and destination (2.0).  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FRAMEWORK_VERSIONS_DO_NOT_MATCH.)

I went to this page and did #2 under ERROR_FRAMEWORK_VERSIONS_DO_NOT_MATCH

http://www.iis.net/learn/publish/troubleshooting-web-deploy/web-deploy-error-codes .

Restarted the service and I continue to still get the error.

Please help.

UPDATE:

Ran

msdeploy -verb:sync -source:machineConfig32 -dest:machineConfig32,computerName=10.10.10.10 -disableSkipDirective:ConfigProtectedData

and got

C:\Program Files\IIS\Microsoft Web Deploy V3>msdeploy -verb:sync -source:machine
Config32 -dest:machineConfig32,computerName=10.10.10.10 -disableSkipDirective:Con
figProtectedData 
Info: Using ID '0998ab97-343f-4338-8f74-ceaf614ea0d1' for connections to the rem
ote server.
Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes c
opied)

Your application is written in a newer version of .Net (4.0) than the version that is installed on the server (2.0). You will probably need to update the server to .Net 4.0 .

Here are instructions on how to install 4.0 . Basically, you just download the code and run it.

Different versions of .Net can run side by side on the same machine.

If you have issues with having the server connected to the internet for the install, you can get some guidance here .

Edit: This article specifically addresses the .NET Framework Configuration Provider and the changes needed for 4.0.

Try Skipping AppPool sync. May be your application AppPool is configured to use different version of Asp.Net on both source and destination server.

I had this problem and was going absolutely crazy trying to resolve it. Release worked fine but I could not do a Debug deploy. I definitely has .Net 4 in both environments. Finally, I turned on warnings and noticed a message that indicated that 2 deployment parameters were specified that should not be used together. I went to Properties > Package/Publish Web and unchecked " Include IIS settings as configured in IIS Express ". Viola! What a PITA.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM