Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install .NET Framework 4.5.1 in a cloud service role

I get the following warning so the publish of cloud service fails from Azure SDK 2.1.

Warning 1 The project 'WCFServiceSurferlite' targets .NET Framework 4.5.1. To make sure that the role starts, this version of the .NET Framework must be installed on the virtual machine for this role. You can use a startup task to install the required version, if it is not already installed as part of the Windows Azure guest OS. For more details, see http://go.microsoft.com/fwlink/?LinkId=309796.

I can't target to 4.5 because it is not available in Visual Studio 2013.

How can I solve this. Please Help.

like image 986
uddhab Avatar asked Mar 22 '23 14:03

uddhab


2 Answers

Update - April 2 2014 - * Answering this question as it shows up as one of first results on popular engines, while searching for trying to install Microsoft .NET framework 4.5.1 on Azure Cloud service.

The easiest way would be to set osFamily attribute to "4" in the Cloud Service Configuration file (.cscfg file). This will bring up an instance of Windows Server 2012 R2 with Microsoft .NET framework 4.5.1 installed.

Example:

<ServiceConfiguration serviceName="CloudDeploymentShell" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="4" osVersion="*" ...
like image 80
Shashank Banerjea Avatar answered Mar 31 '23 19:03

Shashank Banerjea


Here is a blog post from a guy who deployed 4.5 before it was avail in Azure. The same approach should work for 4.5.1. http://danieljsinclair.wordpress.com/2012/06/28/how-i-got-net-4-5-rc-running-in-a-windows-azure-webrole/

like image 45
Jez Avatar answered Mar 31 '23 20:03

Jez