chanan / BlazorStrap

Bootstrap 4 Components for Blazor Framework
https://blazorstrap.io
The Unlicense
916 stars 157 forks source link

Unhandled Error for property BlazorStrapSrc #598

Closed coolblue2000 closed 1 year ago

coolblue2000 commented 1 year ago

I am getting the following error despite following the setup docs for a Blazor WASM app

Unhandled exception rendering component: Cannot provide a value for property 'BlazorStrapSrc' on type 'BlazorStrap.V5.BSContainer'. There is no registered service of type 'BlazorStrap.IBlazorStrap'.

Does anyone know why this might be happening?

jbomhold3 commented 1 year ago

You likely missed this step

  1. In Program.cs add builder.Services.AddBlazorStrap();
coolblue2000 commented 1 year ago

Do you know what. That is it. However I did have that line of code but it turns out I put it in the Program.cs in the server project rather than the client project....

jbomhold3 commented 1 year ago

Easy to do when your starting out on the hosted model all good :)