{"action":"created","issue":{"url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/617","labels_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/617/labels{/name}","comments_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/617/comments","events_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/617/events","html_url":"https://github.com/umbraco/Umbraco-CMS/pull/617","id":53489219,"number":617,"title":"Upgradable Mvc5/WebApi2","user":{"login":"Shazwazza","id":1742685,"avatar_url":"https://avatars.githubusercontent.com/u/1742685?v=3","gravatar_id":"","url":"https://api.github.com/users/Shazwazza","html_url":"https://github.com/Shazwazza","followers_url":"https://api.github.com/users/Shazwazza/followers","following_url":"https://api.github.com/users/Shazwazza/following{/other_user}","gists_url":"https://api.github.com/users/Shazwazza/gists{/gist_id}","starred_url":"https://api.github.com/users/Shazwazza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shazwazza/subscriptions","organizations_url":"https://api.github.com/users/Shazwazza/orgs","repos_url":"https://api.github.com/users/Shazwazza/repos","events_url":"https://api.github.com/users/Shazwazza/events{/privacy}","received_events_url":"https://api.github.com/users/Shazwazza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"nul800sebastiaan","id":304656,"avatar_url":"https://avatars.githubusercontent.com/u/304656?v=3","gravatar_id":"","url":"https://api.github.com/users/nul800sebastiaan","html_url":"https://github.com/nul800sebastiaan","followers_url":"https://api.github.com/users/nul800sebastiaan/followers","following_url":"https://api.github.com/users/nul800sebastiaan/following{/other_user}","gists_url":"https://api.github.com/users/nul800sebastiaan/gists{/gist_id}","starred_url":"https://api.github.com/users/nul800sebastiaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nul800sebastiaan/subscriptions","organizations_url":"https://api.github.com/users/nul800sebastiaan/orgs","repos_url":"https://api.github.com/users/nul800sebastiaan/repos","events_url":"https://api.github.com/users/nul800sebastiaan/events{/privacy}","received_events_url":"https://api.github.com/users/nul800sebastiaan/received_events","type":"User","site_admin":false},"milestone":null,"comments":14,"created_at":"2015-01-06T07:35:26Z","updated_at":"2015-01-18T13:15:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/617","html_url":"https://github.com/umbraco/Umbraco-CMS/pull/617","diff_url":"https://github.com/umbraco/Umbraco-CMS/pull/617.diff","patch_url":"https://github.com/umbraco/Umbraco-CMS/pull/617.patch"},"body":"This PR includes all of the code changes required to Umbraco core to make it compatible with both MVC4/5 and WebApi1/2.\r\n\r\nI've tested an existing Umbraco 7.2.1 install and then upgraded to this version (which I've marked as 7.3) and then upgrade via Nuget to MVC5 and WebApi2 which works great. You need to follow the standard Microsoft upgrade path: http://www.asp.net/mvc/overview/releases/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2\r\n\r\nThis PR also loosens up the MVC/WebApi dependencies so Umbraco will allow MVC/WebApi versions that are less than 6 - this makes the Nuget upgrade possible.\r\n\r\nI've also removed Umbraco's references to Microsoft.Web.Helpers library since we don't use it at all and it has compatibility problems. If you upgrade you'll need to remove this reference (which is also described in MS's upgrade docs)\r\n\r\nThe way that this is supporting MVC4/5 and WebApi1/2 is via reflection, namely in 2 places:\r\n\r\n* ReflectedFixedRazorViewEngine - which detects the MVC version, if it's >= 5 then the wrapped engine will just be the standard RazorViewEngine, otherwise it uses reflection to create an instance of the deprecated FixedRazorViewEngine. The reflection is only used at startup so performance won't be much affected.\r\n* ApplicationTreeExtensions is updated to check the WebApi version since some properties exist in the new version that don't in the old version so these need to be set via reflection. The reflected PropertyInfo's are cached so performance won't be much affected.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/comments/70407855","html_url":"https://github.com/umbraco/Umbraco-CMS/pull/617#issuecomment-70407855","issue_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/617","id":70407855,"user":{"login":"sitereactor","id":1398823,"avatar_url":"https://avatars.githubusercontent.com/u/1398823?v=3","gravatar_id":"","url":"https://api.github.com/users/sitereactor","html_url":"https://github.com/sitereactor","followers_url":"https://api.github.com/users/sitereactor/followers","following_url":"https://api.github.com/users/sitereactor/following{/other_user}","gists_url":"https://api.github.com/users/sitereactor/gists{/gist_id}","starred_url":"https://api.github.com/users/sitereactor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sitereactor/subscriptions","organizations_url":"https://api.github.com/users/sitereactor/orgs","repos_url":"https://api.github.com/users/sitereactor/repos","events_url":"https://api.github.com/users/sitereactor/events{/privacy}","received_events_url":"https://api.github.com/users/sitereactor/received_events","type":"User","site_admin":false},"created_at":"2015-01-18T13:15:13Z","updated_at":"2015-01-18T13:15:13Z","body":"I tried this again removing the two mentioned nuget packages, and adding the code as part of my solution instead and this works perfectly fine. So yeah looks like there is something funky going on with the extension methods, which is unrelated to this PR."}}