Skip to content

Upgrade HeroIcons library for .NET 9 auto render support#4

Open
TaylorWatson wants to merge 1 commit intomainfrom
codex/upgrade-to-.net-9-and-enable-auto-mode
Open

Upgrade HeroIcons library for .NET 9 auto render support#4
TaylorWatson wants to merge 1 commit intomainfrom
codex/upgrade-to-.net-9-and-enable-auto-mode

Conversation

@TaylorWatson
Copy link
Member

Summary

  • retarget the HeroIcons Razor Class Library and sample app to .NET 9 with nullable reference types enabled
  • embed the SVG assets and update the component logic so icons render without HTTP access, enabling Blazor InteractiveAuto compatibility
  • refresh documentation to highlight the .NET 9 upgrade and correct default parameter values

Testing

  • Not run (dotnet CLI is unavailable in the execution environment)

https://chatgpt.com/codex/tasks/task_e_68e70333537483328776f9e43b7a4ce5

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +29 to +31
<EmbeddedResource Include="wwwroot/icons/**/*.svg">
<LogicalName>TailBlazor.HeroIcons.icons.%(RecursiveDir)%(Filename)%(Extension)</LogicalName>
</EmbeddedResource>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Align embedded SVG names with lookup format

The project now embeds the SVGs with LogicalName constructed from %(RecursiveDir), which preserves the directory separator. That yields resource names like TailBlazor.HeroIcons.icons.outline/academic-cap.svg, but the runtime lookup in TailBlazorHeroIconBase requests TailBlazor.HeroIcons.icons.{style}.{icon}.svg (dots instead of /). As a result GetManifestResourceStream never finds any icon and the component throws the InvalidOperationException for every render. Replace the slash in %(RecursiveDir) with a dot or adjust the lookup string so the resource names match.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant