开发者

Deploy from Visual Studio 2010 stopped working after upgrade to Web Deployment Tool 2.1

开发者 https://www.devze.com 2023-03-07 14:30 出处:网络
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 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 er开发者_高级运维ror 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.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号