Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade instructions doesn't seem to be complete #8

Open
BentTranberg opened this issue Mar 22, 2020 · 0 comments
Open

Upgrade instructions doesn't seem to be complete #8

BentTranberg opened this issue Mar 22, 2020 · 0 comments

Comments

@BentTranberg
Copy link

BentTranberg commented Mar 22, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant