英文:
BlazorStrap Server not working with .NET 6
问题
services.AddBootstrapCss();
services.AddScoped<ILoggerRepository, LoggerRepository>();
services.AddBootstrapCss();
services.AddScoped<ILoggerRepository, LoggerRepository>();
英文:
services.AddBootstrapCss();
services.AddScoped<ILoggerRepository, LoggerRepository>();
My IDE complains that AddBootstrapCss
Severity Code Description Project File Line Suppression State
Error CS1061 'IServiceCollection' does not contain a definition for 'AddBootstrapCss' and no accessible extension method 'AddBootstrapCss' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)
Reference
https://blazorstrap.io/V1/
This is a .NET Core 5 to .NET Core 6 upgrade so I am not sure what the replacement would be for this.
答案1
得分: 1
经过测试,我发现问题的原因是官方文档尚未更新。在 Blazorstrap 版本 <= 1.5.1
中支持 AddBootstrapCss。
在最新文档中,快速使用教程未更新,但我找到了一个示例,官方链接已失效,你可以参考这个存储库。
英文:
After testing, I found that the cause of the problem is that the official documentation has not been updated. AddBootstrapCss is supported when blazorstrap is in version <= 1.5.1
.
In the latest document, there is no update in the quick use tutorial, but I found a sample whose official link is invalid, you can refer to this repo.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论