Does not work on MVC6 (Core)

Oct 6, 2016 at 4:25 PM
This almost works. Fails at the last hurdle, when attempting to render the ReportViewer control in the view:

__@Html.ReportViewer(ViewBag.ReportViewer as Microsoft.Reporting.WebForms.ReportViewer)

ends in run-time error:

'IHtmlHelper<Booking>' does not contain a definition for 'ReportViewer' and the best extension method overload 'HtmlHelperExtensions.ReportViewer(HtmlHelper, ReportViewer)' requires a receiver of type 'HtmlHelper'

As far as I can tell I have all the references, the project is targeting both .Net 4.6.1 and Core (so I can use System.Web and other assemblies missing in Core).

Any suggestions??