CodeJunkie.Metadata 1.0.0

dotnet add package CodeJunkie.Metadata --version 1.0.0
                    
NuGet\Install-Package CodeJunkie.Metadata -Version 1.0.0
                    
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="CodeJunkie.Metadata" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeJunkie.Metadata" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="CodeJunkie.Metadata" />
                    
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 CodeJunkie.Metadata --version 1.0.0
                    
#r "nuget: CodeJunkie.Metadata, 1.0.0"
                    
#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 CodeJunkie.Metadata@1.0.0
                    
#: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=CodeJunkie.Metadata&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=CodeJunkie.Metadata&version=1.0.0
                    
Install as a Cake Tool

Metadata

CodeJunkie.Metadata is a metaprogramming tool for generating metadata and enabling reflection-like capabilities in ahead-of-time (AOT) environments such as iOS.

Installation

Add the latest versions of [Metadata] and [Metadata Generator] from NuGet to your C# project.

Requirements

  • .NET 8 SDK: Ensure your project targets the latest .NET 8 SDK to avoid compiler mismatches (CS9057 warning). Treat this warning as an error to prevent downstream issues.

Example Configuration

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>

    <WarningsAsErrors>CS9057</WarningsAsErrors>

  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="CodeJunkie.Metadata" Version="x.x.x" />
    <PackageReference Include="CodeJunkie.Metadata.Generator" Version="x.x.x" PrivateAssets="all" OutputItemType="analyzer" />
  </ItemGroup>
</Project>

Overview

Metadata is a metaprogramming tool that enables C# developers to:

  • Generate metadata about types at build time.
  • Avoid runtime reflection issues in AOT environments like iOS.
  • Power other Code Junkie tools such as [States] and [Seralization].

Key Features

  • Registry of all globally visible types.
  • Metadata generation for types, attributes, and properties.
  • Support for mixins and type hierarchies.
  • Optimized for AOT environments.

The Metadata package provides the following features:

  • Create a registry of all types visible from the global scope.
  • Generate metadata about visible types.
  • Track types by id and version.
  • Allow types to implement and look up mixins.
  • Compute and cache type hierarchies, attributes, and properties.
  • Track generic types of properties in a way that enables convenient serialization in AOT environments.

Usage

Introspective Types

Add the [Meta] attribute to a partial class or record to enable metadata generation.

using CodeJunkie.Metadata;

[Meta]
public partial class MyType;

public partial class Container {
  [Meta] // Nested types are supported.
  public partial class MyNestedType;
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CodeJunkie.Metadata:

Package Downloads
CodeJunkie.Serialization

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 248 5/19/2025