简体   繁体   中英

How to use .NET framework 4.6 with Azure Websites?

The .NET framework 4.6 is released. I've migrated my application but when I deploy to an Azure Website I get the following error:

D:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(983,5): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

Is there any way to install or bundle this with a release?

Update:

https://azure.microsoft.com/en-us/blog/update-on-net-framework-4-6-and-azure/

Update (August 14, 2015) - We're happy to announce that .NET Framework 4.6 has been rolled out to Azure App Service. So Web App developers can now build and deploy ASP.NET applications running .NET Framework 4.6 to Azure Web Apps.

OUTDATED Original Answer:

According to the following blog post on MSDN:

http://blogs.msdn.com/b/webdev/archive/2015/07/20/announcing-asp-net-4-6-and-asp-net-5-beta-5-in-visual-studio-2015-release.aspx#pub46Hosting

"Azure Web Apps Availability

With the brand-new release of ASP.NET 4.6, the Azure Web Apps service is still being prepared and tested for this important update. Once we have confirmed that Azure Web Apps can host an ASP.NET 4.6 application with the same high level of performance and fidelity that you expect from Microsoft Azure, we will announce compatibility of the service. Our operations team is working diligently and we will update you on the Microsoft Azure blog in the near future."

Per David Ebbo on the MSDN Forums, 4.6 is now supported.

The 4.6 update is now complete. Enjoy!

Note that the Azure Portal still says 4.5, and will soon be updated. But that's just a string update, and 4.5 really means 4.6.

If the incorrect string bothers you and you really want to know for sure. You can verify it by opening Kudu and navigating to D:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework to see what versions are available. For more info see here .

As of August 14th, .NET 4.6 is officially supported on Azure Websites (Azure Web Apps), according to this...

https://azure.microsoft.com/blog/2015/08/11/update-on-net-framework-4-6-and-azure/

Update (August 14, 2015) – We're happy to announce that .NET Framework 4.6 has been rolled out to Azure App Service. So Web App developers can now build and deploy ASP.NET applications running .NET Framework 4.6 to Azure Web Apps.

If you are tied to .NET 4.6, you can create an Azure VM (in the new portal click New | Compute | Windows Server 2012 R2 and follow on through - in old portal it is helpfully called "Virtual Machines"!) and then install .NET 4.6 to that server.

You can then deploy your .NET 4.6 website to that Virtual Machine.

It is more work and admin that an Azure Web App (and than this answer might imply) but it will get you live with 4.6 if needs be.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM