Skip to content

Aspnetcore documentation + runtime issues with the latest versions? #383

@OkayX6

Description

@OkayX6

Hi!

My project targets .NET 8.0

Incomplete sample code?

I found that this documentation is not working on my project

Image

I had to add this extra line (Cursor told me how to fix it 🤷)

Image

Additional config needed

Also I ran into this exception

Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
      An unhandled exception has occurred while executing the request.
      System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Primitives, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
      File name: 'Microsoft.Extensions.Primitives, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
         at Fable.Remoting.AspNetCore.Middleware.buildFromImplementation@109-1.MoveNext()
         at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
         at Fable.Remoting.AspNetCore.Middleware.buildFromImplementation@109.Invoke(FSharpFunc`2 next, HttpContext ctx)
         at <StartupCode$Fable-Remoting-AspNetCore>[email protected]()
         at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

I fixed it by adding a package reference

<PackageReference Include="Microsoft.Extensions.Primitives" Version="9.0.0" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions