locked
Error with @Html.Partial - Site not compiling after Nuget Razor update RRS feed

  • Question

  • User859057688 posted

    I am trying to update a site so I can share it with some other developers using Team Services. I updated a number of NuGet packages and all was OK, then I updated Microsoft.AspNet.Razor from 3.0.0 to 3.2.3. The update installed and/or updated a number of dependencies. Since then the site will not run.

    When I try to run it I get this:

    Visual Studio will not build the project and shows the following error:

    When I try to edit the lines with the errors, only lets me enter members of HtmlHelper. I have looked for what Partial was a member of without success. I have also tried to revert the Razot and other NuGet packages but only got deeper into the can of worms.

    Any suggestions would be most welcome.

    Thanks in advance,

    Rob

    Tuesday, December 5, 2017 2:15 AM

All replies

  • User347430248 posted

    Hi rlkeith,

    did you try to check the version entries in Web.config file.

    check it and if those are not correct then try to correct it may solve your issue.

    Regards

    Deepak

    Tuesday, December 5, 2017 3:27 AM
  • User991499041 posted

    Hi Rlkeith,

    Welcome to ASP.NET Forums.

    Try these steps.

    1. Run a Clean on the solution

    2. Unload project with the issues

    3. Delete the .user file that Visual Studio generated next to the project.

    4. Reload project with the issues

    5. Build the solution

    Regards,

    zxj

    Tuesday, December 5, 2017 6:14 AM
  • User859057688 posted

    Hello Deepak,

    Thanks for the reply. I double.checked all of the entries in the web.config file and could find no inconsistencies. I am working on reverting all of the updated packages and references.

    Regards,

    Rob

    Wednesday, December 6, 2017 1:01 AM
  • User859057688 posted

    Thanks for the detailed reply. I followed the instructions and there was no change.

    I have found an old version of the packages.config file and I am working on putting all of the packages back the way they were. Any more clues would be most welcome.

    Regards,

    Rob

    Wednesday, December 6, 2017 1:04 AM
  • User347430248 posted

    Hi rlkeith,

    please try to make a new project for testing purpose and try to include the newer version of nugget razor in that.

    check whether it is working correctly or not.

    if it is working correctly then you can try to copy all contents from current project to new project to solve the issue.

    let us know if this suggestion work for you or not.

    we will try to provide you further suggestion , if needed.

    Regards

    Deepak

    <sub></sub><sup></sup>

    Wednesday, December 6, 2017 7:49 AM