I have a Blazor .NET6.0 project. I have developed a UI plugin system and a translate service (IStringLocalizer does not work inside the plugin).
Everything goes ok in debug mode and standalone release mode. But when I start it in docker-compose in release mode a 'Could not load file or assembly 'mscorlib, Version=4.0.0.0' exception is thrown. The exception is thorwn in this line:
resourceManager = new System.Resources.ResourceManager($"{Assembly}.{Class}.{Language}", _localizationAssembly);
I insist that in debug mode it works ok.
Ok, I finally managed to get it to work with
ResourceReader.ResourceManagerworks okay inside a Blazor page (OnInitilized), but fails outside it.ResourceReaderworks fine.