Skip to content

Upgrade instructions doesn't seem to be complete #8

@BentTranberg

Description

@BentTranberg

I just upgraded from 0.9 to the latest 0.12. On the way I had some difficulties.

After following the instructions carefully, running in Debug and Release both failed. It was possible to browse the site, but pictures didn't appear at all, and Bulma was obviously not working.

I decided to download the latest Bolero template, create a new Bolero solution, and compare that with my source. I found out that there was one assembly missing, and some source lines missing.

The missing assembly in my server was

<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.0" />

Further study of the template revealed the following.

The line

         services.AddMvcCore() |> ignore

I have replaced with

        services.AddMvc().AddRazorRuntimeCompilation() |> ignore
        services.AddServerSideBlazor() |> ignore

The instructions tell us to replace this

.UseEndpoints(fun endpoints ->
    endpoints.MapDefaultControllerRoute() |> ignore
    endpoints.MapFallbackToClientSideBlazor<Client.Startup>("index.html") |> ignore)

with this

.UseEndpoints(fun endpoints ->
    endpoints.MapControllers() |> ignore
    endpoints.MapFallbackToFile("index.html") |> ignore)

which I did first, but instead of

endpoints.MapControllers() |> ignore

which is missing in the template, I now have this line from the template

endpoints.MapBlazorHub() |> ignore

I don't know whether I should use one of these lines or both. Can I have some advice about this, please.

My web server works well now.

Thanks for a great product.

edit: I wrote "doesn't seem" in the title, because I don't know for sure what my project should have looked like before I started the upgrade. Maybe I've missed something at some point earlier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions