question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fix: PublishFluentIconAssets not working in the v2.1 nuget package

See original GitHub issue

šŸ› Bug Report

v2.1 of the nuget package are missing icons. Using the readme to include them throws an exception.

I tried to add it to my existing project but when using the datagrid that needs icons for the sort and filter indicator, it throws the following exception:

Unhandled exception rendering component: The requested icon (ArrowSortUp, Size20, Regular) is not available in the collection System.ArgumentException: The requested icon (ArrowSortUp, Size20, Regular) is not available in the collection at Microsoft.Fast.Components.FluentUI.FluentIcon.OnInitialized() in /_/src/Microsoft.Fast.Components.FluentUI/Components/Icon/FluentIcon.cs:line 95 at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()

Seems the icons are not loaded. I tried to follow the latest what’s new readme by adding the following to the project file: <PublishFluentIconAssets>true</PublishFluentIconAssets> <PublishFluentEmojiAssets>true</PublishFluentEmojiAssets>

But it still didn’t work

I also create a new blazor server app using the provided templates and added <PublishFluentIconAssets>true</PublishFluentIconAssets> along with the runtime check in program.cs eg:

LibraryConfiguration config = new(ConfigurationGenerator.GetIconConfiguration(), ConfigurationGenerator.GetEmojiConfiguration()); builder.Services.AddFluentUIComponents(config);

but it threw the exception below:

System.AggregateException: 'Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Microsoft.Fast.Components.FluentUI.Infrastructure.IStaticAssetService Lifetime: Scoped ImplementationType: Microsoft.Fast.Components.FluentUI.HttpBasedStaticAssetService': Unable to resolve service for type 'System.Net.Http.HttpClient' while attempting to activate 'Microsoft.Fast.Components.FluentUI.HttpBasedStaticAssetService'.)'

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
Marfusioscommented, Feb 27, 2023

Thanks a lot! Will check it tomorrow

1reaction
jakupjcommented, Feb 24, 2023

Thanks that worked.

But the datagrid only shows the up arrow when sorting in any direction. The demo site has the same behaviour

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting NuGet Package Restore in Visual Studio
Quick solution for Visual Studio users​​ If you're using Visual Studio, first enable package restore as follows. Otherwise continue to theĀ ...
Read more >
Cannot add or update NuGet packages, receiving ...
Go Tools=>Nuget Package Manager=>Package Manager Settings=>Package Source to check if you have other package source whose URL isĀ ...
Read more >
Unable to resolve dependencies of NuGet packages
Clear the NuGet cache files. You do this in the following way: In the toolbar of Visual Studio, navigate to Tools Ā» NuGet...
Read more >
Fix Not available in this source | NuGet Visual Studio Error ...
Trying to Install/Reinstall NuGet packages, but getting a " Not available in this source" message or error? Well, this video shows you allĀ ......
Read more >
Package restore intermittently fails with "Unable to find ...
GitVersioning not being found) is of course from nuget.org. And it seemed to happen more frequently after I removed the v2 package sourceĀ ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found