amaletski.nanoFramework.SourceGenerators
0.1.3
dotnet add package amaletski.nanoFramework.SourceGenerators --version 0.1.3
NuGet\Install-Package amaletski.nanoFramework.SourceGenerators -Version 0.1.3
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="amaletski.nanoFramework.SourceGenerators" Version="0.1.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add amaletski.nanoFramework.SourceGenerators --version 0.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: amaletski.nanoFramework.SourceGenerators, 0.1.3"
#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.
// Install amaletski.nanoFramework.SourceGenerators as a Cake Addin
#addin nuget:?package=amaletski.nanoFramework.SourceGenerators&version=0.1.3
// Install amaletski.nanoFramework.SourceGenerators as a Cake Tool
#tool nuget:?package=amaletski.nanoFramework.SourceGenerators&version=0.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nanoFramework.SourceGenerators
Package Installation (Visual Studio)
- Install the NuGet package as usual.
- Unload the project:
- Right-click the project in the "Solution Explorer" window.
- Select "Unload Project".
- Open the project file:
- Right-click the unloaded project in the "Solution Explorer" window.
- Select "Edit Project File".
- Edit the project file:
- Add the following
Import
node (somewhere at the top of the project node).
Note: Replace [PackageVersion] with the appropriate version.<Import Project="..\packages\amaletski.nanoFramework.SourceGenerators.[PackageVersion]\build\netnano1.0\amaletski.nanoFramework.SourceGenerators.props" />
- Add the following
ItemGroup
withAnalyzer
node:
Note: Replace [PackageVersion] with the appropriate version.<ItemGroup> <Analyzer Include="..\packages\amaletski.nanoFramework.SourceGenerators.[PackageVersion]\analyzers\dotnet\cs\*.dll" /> </ItemGroup>
- Press
Ctrl+S
to save changes.
- Add the following
- Reload the project:
- Right click the unloaded project in the "Solution Explorer" window.
- Select "Reload Project".
[!IMPORTANT] Make sure to update the imports after updating the NuGet package version.
Use Cases
Generating the ResourcesMetadataProvider class
To utilize this feature, an AdditionalFiles
item node must be added to the nfproj
file. This node can include attributes to specify which metadata properties and metadata provider methods should be generated. Below is an example that includes all applicable attributes:
<ItemGroup>
<AdditionalFiles Include="Resources.resx"
ResourceMetadata_IncludeName="true"
ResourceMetadata_IncludeUriPath="true"
ResourceMetadata_IncludeSize="true"
ResourceMetadata_IncludeContentType="true"
ResourceMetadata_IncludeContentEncoding="true"
ResourcesMetadataProvider_Generate="true"
ResourcesMetadataProvider_GenerateFindByName="true"
ResourcesMetadataProvider_GenerateFindByUriPath="true" />
</ItemGroup>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NETnanoFramework | netnano1.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in 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 |
---|---|---|
0.1.3 | 96 | 4/4/2024 |