Generate FluentUI Icons classes
devTo generate FluentUI Icons classes from SVG images, follow these steps in a Linux environment (use WSL2 on Windows, e.g., Ubuntu 22.04):
- Clone the source icons repository:
git clone https://github.com/microsoft/fluentui-system-icons.git - Install dependencies: Navigate to
/packages/svg-iconsand runnpm install --only=dev. You may also need to run this in the root folder. - Build the icons:
npm run clean npm run buildforblazor - Transfer files: Copy the contents of the generated
iconsfolder (located undersvg-icons) to a temporary local folder (e.g.,C:\Temp\Icons) usingrsyncor your preferred method. - Run the Generator: Use the
FluentAssetsGenerator.exetool to create the C# classes, pointing to your temporary folder and specifying the target directory and library type.
FluentAssetsGenerator.exe --Assets=C:\Temp\Icons --Target=./Samples --Library=Icon