2

According to this semi-official answer here, Azure websites now supports .NET 4.5.2:

https://stackoverflow.com/a/23554969/68231

However, when I visit the Kudu debug console, it doesn't show that .NET 4.5.2 is installed:

enter image description here

And indeed, when I try to push out a website targeted to .NET 4.5.2, Kudu refuses to build and deploy the website in question, with errors like this:

Areas\Integration\Controllers\TwitterController.cs(18,31): error CS0012: The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. [D:\home\site\repository\Payboard.Web\Payboard.Web.csproj]

What am I missing? Is there something I need to do to get 4.5.2 installed? Or...?

Community
  • 1
  • 1
Ken Smith
  • 20,305
  • 15
  • 100
  • 147
  • You are looking at the directory that contains the reference assemblies, it is distinct from the .NET install directory. Google ".net 4.5.2 targeting pack". Fwiw, there is no point in targeting 4.5.2, it has very few useful changes in the api, only runtime improvements. You already got those. – Hans Passant Feb 24 '15 at 01:37
  • This was the recommended technique for seeing which versions are supported as of this question here: http://stackoverflow.com/questions/24144331/what-versions-of-net-are-supported-on-azure-web-sites?lq=1. Is that answer wrong? As for why I need it - I've been troubleshooting a connection problem with the new SQL Azure V12 release, and was asked by the folks on the SQL Azure team to try 4.5.2. Agreed that there's not much point, but was trying to do my best to cooperate. – Ken Smith Feb 24 '15 at 02:08
  • 1
    It is wrong, check the release number as [documented here](https://msdn.microsoft.com/en-us/library/hh925568%28v=vs.110%29.aspx#net_b). .NET 4.5.2 is release number 379893 – Hans Passant Feb 24 '15 at 02:20
  • 2
    you can run `reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"` and look at the `Release` number you get back. It should be `0x5cbf5` which is hex for `379893` the release number for .NET 4.5.2 from the document Hans linked to above – ahmelsayed Feb 24 '15 at 02:26
  • OK, thanks, that works. And it does say `0x5cbf5` - so far so good. Is the problem then that the .NET 4.5.2 targeting pack isn't installed, so that the Kudu build/deploy process doesn't work? – Ken Smith Feb 24 '15 at 04:11
  • I can publish a vanilla MVC project from VS that's targeting 4.5.2 fine though with warning from MSBuild. we should probably look into that. Can you please open an issue here for this https://github.com/projectkudu/kudu/issues it'll help if you can include a sample repo for a project that's failing to publish – ahmelsayed Feb 24 '15 at 19:33

0 Answers0