Missing Reference

M J 661 Reputation points
2021-09-24T21:03:44.053+00:00

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?

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,289 questions
0 comments No comments
{count} votes

Accepted answer
  1. M J 661 Reputation points
    2021-09-27T19:47:34.41+00:00

    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.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. M J 661 Reputation points
    2021-09-24T22:20:39.463+00:00

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

    0 comments No comments

  2. Yijing Sun-MSFT 7,071 Reputation points
    2021-09-27T05:53:58.283+00:00

    Hi @M J ,
    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.

    0 comments No comments

  3. M J 661 Reputation points
    2021-09-27T15:03:06.797+00:00

    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?

    0 comments No comments