OALY2000.ID3v2
1.0.0
dotnet add package OALY2000.ID3v2 --version 1.0.0
NuGet\Install-Package OALY2000.ID3v2 -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="OALY2000.ID3v2" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OALY2000.ID3v2" Version="1.0.0" />
<PackageReference Include="OALY2000.ID3v2" />
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 OALY2000.ID3v2 --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OALY2000.ID3v2, 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 OALY2000.ID3v2@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=OALY2000.ID3v2&version=1.0.0
#tool nuget:?package=OALY2000.ID3v2&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OALY2000.ID3v2
AOT-compatible ID3v2 tag reading and writing library for .NET. Supports ID3v2.2, ID3v2.3, and ID3v2.4.
Quick Start
using OALY2000.ID3v2;
// Read ID3v2 tags from an MP3 file
var tag = new Id3v2Tag("music.mp3");
Console.WriteLine($"Title: {tag.Title}");
Console.WriteLine($"Artist: {tag.Artist}");
Console.WriteLine($"Album: {tag.Album}");
Console.WriteLine($"Year: {tag.Year}");
Console.WriteLine($"Track: {tag.Track}");
// Access frames by type
if (tag.Picture != null)
Console.WriteLine($"Cover: {tag.Picture.MimeType}, {tag.Picture.PictureData.Length} bytes");
if (tag.Lyrics != null)
Console.WriteLine($"Lyrics: {tag.Lyrics.Length} characters");
// Enumerate all frames
foreach (var frame in tag.Frames)
Console.WriteLine($" {frame.FrameId}: {frame}");
Creating and Writing Tags
var tag = new Id3v2Tag
{
Title = "My Song",
Artist = "My Band",
Album = "My Album",
Year = "2026",
Track = "1",
Genre = "Rock"
};
// Add a cover image
tag.Picture = new PictureFrame
{
MimeType = "image/jpeg",
PictureType = PictureType.CoverFront,
Description = "Cover",
PictureData = File.ReadAllBytes("cover.jpg")
};
// Write to file
tag.Save("music.mp3");
Frame Types
| Frame ID | Description | Strongly-typed Property |
|---|---|---|
| TIT2 | Title/Song name | tag.Title |
| TPE1 | Lead artist | tag.Artist |
| TALB | Album name | tag.Album |
| TYER/TDRC | Year/Date | tag.Year |
| TRCK | Track number | tag.Track |
| TCON | Genre | tag.Genre |
| TPOS | Disc number | tag.Disc |
| TPE2 | Album artist | tag.AlbumArtist |
| TCOM | Composer | tag.Composer |
| TBPM | Beats per minute | tag.Bpm |
| COMM | Comments | tag.Comment |
| USLT | Lyrics | tag.Lyrics / tag.LyricsLanguage |
| APIC | Attached picture | tag.Picture |
Advanced Usage
// Check if a file has an ID3v2 tag
bool hasTag = Id3v2Tag.HasTag("music.mp3");
// Remove all tags
Id3v2Tag.RemoveTag("music.mp3");
// Search frames by ID
var artistFrame = tag.Frames["TPE1"];
// Search frames by type
var allComments = tag.Frames.GetAll<CommentFrame>();
// Remove specific frames
tag.Frames.RemoveAll("COMM");
AOT Compatibility
This library is fully compatible with Native AOT publishing with zero reflection usage.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.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 |
|---|---|---|
| 1.0.0 | 114 | 6/28/2026 |