This was almost a showstopper.
Our views would not compile with ASP.NET Core MVC. Every single one got this error:
Property 'ViewData' is of type 'Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1[[YetaWF.Modules.Text.Controllers.TextModuleController+TextModelDisplay, YetaWF.Text, Version=220.127.116.11, Culture=neutral, PublicKeyToken=null]]', but this method requires a value of type 'Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1[[System.Object, mscorlib, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'.
Parameter name: viewContext
This is in fact a bug (see https://github.com/aspnet/Mvc/issues/5397
). There are a few workarounds, but they are impractical for anything but trivial projects. For details see the issue report at https://github.com/aspnet/Mvc/issues/5397
While I hope this will be addressed in a future version of ASP.NET Core MVC, we obviously don't want to just wait for that.
Instead, YetaWF 2.0 will distribute its own, custom MVC assemblies which correct this problem for now. Unfortunately this is a solution that is very specific to YetaWF and can't be applied as a general solution.
We started using an updated ASP.NET Core MVC "dev" version
1.2 2.0 (Edit: renamed 2.0 end of April 2017), which addresses the problem (mostly). It does require some extra code on our part in YetaWF, but it preserves source compatibility for all our views. For the time being we can include this (unmodified) dev version of MVC and hopefully the official 2.0 (scheduled for Q3 2017) will solve all our issues.
Update 5/20/2017: This was later moved to issue https://github.com/aspnet/Mvc/issues/6291
Update 11/30/2018: The issue was closed without resolution - YetaWF no longer uses Razor views so this is no longer relevant to us.