How to install the .NET Framework 4.5.1 as a cloud service

I get the following warning so that publishing a cloud service fails from Azure SDK 2.1.

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

I cannot target 4.5 because it is not available in Visual Studio 2013.

How can i solve this. Please, help.

+4
source share
3 answers

Update - April 2, 2014 - * Answering this question, since it appears as one of the first results in popular machines, when searching for installing Microsoft.NET framework 4.5.1 on the Azure Cloud service.

The easiest way is to set the osFamily attribute to "4" in the cloud service configuration file (.cscfg file). This will invoke an instance of Windows Server 2012 R2 with Microsoft.NET 4.5.1 installed.

Example:

<ServiceConfiguration serviceName="CloudDeploymentShell" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="4" osVersion="*" ... 
+4
source

Here is a blog post from a guy who deployed 4.5 before he was useful on 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/

+2
source

Visual Studio 2013 is in Beta / Preview. If you cannot target 4.5, you need to either return to VS 2012 to work in Azure, or see if you can install 4.5.1 in role instances using the launch task, as the warning suggests.

As each new version of Visual Studio and .NET appears, there is usually a lag before VS supports Windows Azure tools and again lags after the .NET version is submitted before it is baked into the guest OS, which you can use in Azure.

+1
source

Source: https://habr.com/ru/post/1499904/


All Articles