I had the same problem. However, updating assembly versions, copying local and specific version parameters did not help to solve my problem. In my application configuration, I am deploying a website and a worker role in a cloud service. After creating the service on the configure tab, I installed the operating system on Windows Server 2012 R2 to get support for the .Net Framework 4.5.1. But an error did occur.
In further research, I found that the * .cscfg file for my cloud service overloaded the portal settings with the obscure osFamily "3" setting. When I started my project, it was on MVC3 and did not yet have a WebAPI and framework 4.5.1. osFamily 3 was the last at that time.
In my last deployment, I upgraded my site to version 4.5.1 and MVC5. I verified that it worked locally on my development machine. But after deployment, this did not work with an error referring to System.Net.Http.Formatting version 4.0.0.0, which was not found. Later, I saw a deployment log that indicated a source error
"The NetFx451 feature required by the downloaded package is not available on the OS * selected for deployment.
Here is a blog article that led me to the decision to change the osFamily parameter to 4. Then my site worked after a new deployment.
http://tech.trailmax.info/2014/02/azure-deployment-the-feature-named-netfx451-that-is-required-by-the-uploaded-package-is-not-available-in-the- os-chosen-for-the-deployment /
source share