Npp.Assets.SourceGenerator 1.0.5

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Npp.Assets.SourceGenerator --version 1.0.5
                    
NuGet\Install-Package Npp.Assets.SourceGenerator -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Npp.Assets.SourceGenerator" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Npp.Assets.SourceGenerator" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Npp.Assets.SourceGenerator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Npp.Assets.SourceGenerator --version 1.0.5
                    
#r "nuget: Npp.Assets.SourceGenerator, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Npp.Assets.SourceGenerator@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Npp.Assets.SourceGenerator&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Npp.Assets.SourceGenerator&version=1.0.5
                    
Install as a Cake Tool

This is a source generator for handling NppAssets resource files.

Usage Steps

1. Add a NuGet reference to the Npp.Assets.SourceGenerator package.

2. Add the following entry to your .csproj file to mark all SVG files as NppAssets:

<ItemGroup>
   <NppAssets Include="**\*.svg" />
</ItemGroup>

3. Create a new folder in your project. You can now drop your SVG files into the folder.

4. The source generator will automatically generate resource file paths. You can now use resource files like this:

Assume your folder is named Icons, and the SVG file you dropped is named MyIcon.svg.
In a .cs file, you can use it like this:

string myIconPath = Icons.MyIcon;

In an .axaml file, you can use it like this:

<Svg Path="{x:Static local:Icons.MyIcon}"/>

If you do not want SVG files from a specific folder to be recognized as NppAssets, you can add the following entry to your .csproj file:

<ItemGroup>
   <NppAssets Remove="FolderName\*.svg" />
</ItemGroup>
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated