webgio / Rotativa

Rotativa, /rota'tiva/. Make Pdf from Asp.Net MVC. Available on Nuget https://www.nuget.org/packages/Rotativa
http://letsfollowtheyellowbrickroad.blogspot.it/search/label/Rotativa
MIT License
623 stars 220 forks source link

dependency on ASP.NET MVC 3.0.0.1 #127

Open gerhardjj opened 8 years ago

gerhardjj commented 8 years ago

Hi, In MVC6 (asp.net5) i'm trying to use your package. However i get the following error:

The type action result is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Mvc, version 3.0.0.1...

when i do this:

return new ActionAsPdf(
                           "Index")
            { FileName = "Invoice.pdf" };

Should i actually go and reference MVC 3.0.0.1, is that the only way? Thanks

webgio commented 8 years ago

Hi, I'll look into this shortly. I would like to add functionality to the Nuget package to detect MVC version and install the correct dependencies. I've done the same with RotativaHQ package for mvc 4 and 5, I'll add 6 and port code to Rotativa. I'll notify here when done.

mgolois commented 8 years ago

Looking forward to Rotativa supporting MVC6

webgio commented 8 years ago

Ouch, looks harder then I thought. Trying to add reference to mvc 6

Install-Package Microsoft.AspNet.Mvc -Version 6.0.0-rc1-final

I get a nasty " Failed to add reference to 'System.Runtime'. Please make sure that it is in the Global Assembly Cache."

Actually I have no experience with asp.net 5 and mvc 6. Anyone willing to help?

webgio commented 8 years ago

Of course I was working in VS 2015 and .Net 4.6.1