question

MJ-8053 avatar image
0 Votes"
MJ-8053 asked MJ-8053 answered

Missing Reference

I added Rotativa.MVC with NuGet. I then used NuGet to remove it and installed a different PDF tool. While that one loaded the pdf faster, I could not get it to properly create the document.

Now I want to add Rotativa v 1.7.3 and use it instead. According to NuGet I am able to add it but when you look at the references it is not there. I was able to grab it from another project but am left wondering why is it not finding it in this solution?

dotnet-aspnet-mvc
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MJ-8053 avatar image
0 Votes"
MJ-8053 answered

Here is what I have done to resolve the issue.

I copied the dll from another project and placed it in the bin directory of this project.
I added a reference to the Rotativa.dll This caused an error saying the Target Framework was 4.6.0 and this project was 4.5.2
I then updated the .Net target framework by right clicking the project in Solution Explorer then selecting properties. Then under appliation I changed the target framework to be 4.6.1

After that I needed to update two of the assesmblies in NuGet.

Everything seems to be working now.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MJ-8053 avatar image
0 Votes"
MJ-8053 answered

Update adding the reference from the other project did not work because they targeted different .net frameworks.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YijingSun-MSFT avatar image
0 Votes"
YijingSun-MSFT answered

Hi @MJ-8053 ,
The dependency of Rotativa.MVC nuget is Microsoft.AspNet.MVC(>=5.2.3). I suggest you could check your dependency.
More details,you could refer to below Nuget:
https://www.nuget.org/packages/Rotativa/1.7.3

Best regards,
Yijing Sun


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MJ-8053 avatar image
0 Votes"
MJ-8053 answered MJ-8053 rolled back

So that I understand correctly, are you saying that if the version of Microsoft.AspNet.MVC is different that the Rotativa reference will not show? Does that also prevent the methods from being available?

Also I looked at my current version of Microsoft.AspNet.MVC and it showed I had 5.2.3. I have since updated to 5.2.7

My biggest concern though is why does the reference not appear when I am in solution Explorer and look for the reference to Rotativa?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.