0

I have a web site project that has been existing for a while - it has been ASP.NET MVC2 based up until right now. .Net 4, Visual Studio 2010 Sp1, deployed to IIS 7.5 running on Win2008 R2.

I have four separate deployment profiles - "alpha", "test", "staging" and "live". Yes, I could probably have come up with better names, but they should hopefully convey what they are for.

It was recently decided to upgrade to MVC3 to take advantage of new awesomeness like Razor, global filter attributes, and start using NuGet etc. So I went on an upgrade binge with the Web Platform Installer. One of the things I updated was the Web Deployment Tool - both my developer machine (where the MVC3 upgrade happens) and the web server got this new version of the tool installed.

Since then, I have not been able to do deployments. I have gone back to earlier versions of my project (thanks to git for allowing me to painlessly go back to any previous version) and tried to deploy them, and they don't work either.

Whenever I try to do a deployment from Visual Studio I get the following error:

Web deployment task failed.((23.05.2011 11:18:24) An error occurred when the request was processed on the remote computer.) (23.05.2011 11:18:24) An error occurred when the request was processed on the remote computer. Unable to cast object of type 'Microsoft.Web.Deployment.DeploymentSyncOptions' to type 'Microsoft.Web.Deployment.DeploymentSyncOptions'. 

I can see why that cast would be hard. ;)

But seriously - how can we get deployment from Visual Studio to work again? In the future we will do this using our CI server, and install a deployment package using MsBuild automatically on the correct web server depending on the git branch that was updated, but that is some time in the future.

I have full access to both machines so any other information need can hopefully be gathered.

2 Answers 2

2

You might be having beta version of web deploy on your box if you have ever installed web platform installer v2 beta. YOu can check that by gacutil -l Microsoft.web.deployment.

If you see any 7.5.0.0 version then you have a beta version. Uninstall this version. You need to check and change this on both the client as well as the server.

Sign up to request clarification or add additional context in comments.

1 Comment

Hi, sorry for the slow reply, I didn't have access to the system for a while. I did as you said, and I only have 7.1.0.0 and 8.0.0.0 in the GAC. However - since the problem appeared, both server and development computer have been rebooted, and the problem went away! Either way I am giving you the accepted answer at it is likely to help whoever stumbles across this question in the future. :)
1

Owais is right - this is very likely because you have a pre-release version installed. Rune can you please check and let me know?

1 Comment

Hi, as I commented to Owais above, the problem went away by a simple reboot, and there seems to be no beta installed. I guess we will never know for sure...!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.