none
Error: There was an error running the selected code generator:'package restore failed.Rolling back package changes for ... RRS feed

  • Question

  • Hi My friend 

    When I was creating a 'Mvc Controller with Views , using Entity framework' I caught an Error: There was an error running the selected code generator:'package restore failed.Rolling back package changes for ...

    How can I solve this Error???

    Wednesday, May 29, 2019 8:58 AM

All replies

  • Hi MMGhoreishi,

    Welcome to the MSDN forum.

    What’s your VS version and the project type? If you create a new project and add this controller type, does this issue persists or not.

    For the error message, if often relates to the inappropriate target framework of the projects or go to Tools -> Options -> Nuget Package Manager ->Package Manager Setting-> General -> Clear All Nuget Cache(s). If your solution has multiple, please check their target framework and make sure are the same version, clean and rebuilt the solution, then add new controller.

    Best regards,

    Sara


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, May 30, 2019 6:47 AM
    Moderator