Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Get this error when returning view

Get this error when returning view

Scheduled Pinned Locked Moved .NET (Core and Framework)
asp-netlinuxhostingcloudarchitecture
3 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • pkfoxP Offline
    pkfoxP Offline
    pkfox
    wrote on last edited by
    #1

    This is driving me mad!!! My hobby project a net core 6 Web app was running perfectly until yesterday - I'm now getting this error message whenever I try and return a view. I've obviously done something but I can't for the life of me think what. I can't catch the error either it just bombs and shows this error in the browser - any ideas ? The app runs as a daemon on a Debian box.

    MissingMethodException: Method not found: Microsoft.AspNetCore.Razor.Language.RazorConfiguration Microsoft.AspNetCore.Razor.Language.RazorConfiguration.Create(Microsoft.AspNetCore.Razor.Language.RazorLanguageVersion, System.String, System.Collections.Generic.IEnumerable`1)
    Microsoft.AspNetCore.Mvc.Razor.Extensions.RazorPageDocumentClassifierPass..cctor()

    Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP

    Richard DeemingR 1 Reply Last reply
    0
    • pkfoxP pkfox

      This is driving me mad!!! My hobby project a net core 6 Web app was running perfectly until yesterday - I'm now getting this error message whenever I try and return a view. I've obviously done something but I can't for the life of me think what. I can't catch the error either it just bombs and shows this error in the browser - any ideas ? The app runs as a daemon on a Debian box.

      MissingMethodException: Method not found: Microsoft.AspNetCore.Razor.Language.RazorConfiguration Microsoft.AspNetCore.Razor.Language.RazorConfiguration.Create(Microsoft.AspNetCore.Razor.Language.RazorLanguageVersion, System.String, System.Collections.Generic.IEnumerable`1)
      Microsoft.AspNetCore.Mvc.Razor.Extensions.RazorPageDocumentClassifierPass..cctor()

      Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      At a guess, you've either updated some libraries, or the .NET SDK, and something is now outdated. Looking at the history[^], that method existed in the version of the code from November 2018: razor-compiler/RazorConfiguration.cs at 32ff07c6d4a8037c61a5c75c26fc5f805da19b3a · dotnet/razor-compiler · GitHub[^] But in March 2021, an optional parameter was added: razor-compiler/RazorConfiguration.cs at f26e545a6712f186c84ed4ed956927be8ab52af6 · dotnet/razor-compiler · GitHub[^] You have a library compiled against the 2018 version which is now running against the 2021 (or later) version. I suspect you've updated the Microsoft.AspNetCore.Razor.Language[^] package, but not updated the Microsoft.AspNetCore.Mvc.Razor.Extensions[^] package to match. However, it's possible that your project doesn't directly reference either of these packages, and they're being pulled in as a transitive dependency of another package instead. You may need to dig through the dependency tree of each NuGet package you've referenced.

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      pkfoxP 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        At a guess, you've either updated some libraries, or the .NET SDK, and something is now outdated. Looking at the history[^], that method existed in the version of the code from November 2018: razor-compiler/RazorConfiguration.cs at 32ff07c6d4a8037c61a5c75c26fc5f805da19b3a · dotnet/razor-compiler · GitHub[^] But in March 2021, an optional parameter was added: razor-compiler/RazorConfiguration.cs at f26e545a6712f186c84ed4ed956927be8ab52af6 · dotnet/razor-compiler · GitHub[^] You have a library compiled against the 2018 version which is now running against the 2021 (or later) version. I suspect you've updated the Microsoft.AspNetCore.Razor.Language[^] package, but not updated the Microsoft.AspNetCore.Mvc.Razor.Extensions[^] package to match. However, it's possible that your project doesn't directly reference either of these packages, and they're being pulled in as a transitive dependency of another package instead. You may need to dig through the dependency tree of each NuGet package you've referenced.

        pkfoxP Offline
        pkfoxP Offline
        pkfox
        wrote on last edited by
        #3

        Thanks Richard I updated the nuget packages and the problem disappeared - NuGet does bite me every now and then.

        Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups