Closed Diponchik closed 1 year ago
We are seeing this in our project too, any idea what might be causing this?
It appears to be something strange with how the staticwebassets for the Skoruba.Duende.IdentityServer.Admin.UI NuGet package are handled / processed when running in a non-development environment.
For my custom Duende.IdentityServer.Admin project generated using the template, if I:
{$USERPROFILE}.nuget\packages\skoruba.duende.identityserver.admin.ui\1.1.0\staticwebassets
to {$MyTemplateGeneratedProjectName}\src{$MyTemplateGeneratedProjectName}.Admin\wwwroot
Remove the importing of the staticwebassests as a dependency for the Skoruba.Duende.IdentityServer.Admin.UI NuGet package, which I achieved in a "hacky" way by deleting the line:
from the file:
{$USERPROFILE}.nuget\packages\skoruba.duende.identityserver.admin.ui\1.1.0\build\Skoruba.Duende.IdentityServer.Admin.UI.props
Finally, rebuild my custom Duende.IdentityServer.Admin project.
Then the styles for the Admin project are found successfully when running in an non-development configuration.
Perhaps the manner in which the staticwebassets are being packaged can be improved upon?
The only real documentation I found from Microsoft on this is the following blog post:
https://devblogs.microsoft.com/dotnet/build-client-web-assets-for-your-razor-class-library/
and this documentation page:
Thank you @selangley-wa. Just added webBuilder.UseStaticWebAssets();
to Programs.cs
file for Duende.IdentityServer.Admin project and it works!
Thank you for your PR, I will merge, sorry for the delay, I was busy.
Hello there. I was trying to run an admin project with my "Local" ASPNETCORE_ENVIRONMENT, but I discovered, that styles don't work on this environment and after I changed it back to development, then it started working.
Steps to reproduce: Change ASPNETCORE_ENVIRONMENT to something else ("Local" for example) and run the project. Styles should be missed.