MetaBrainz.MusicBrainz.DiscId 5.3.0

This package has a SemVer 2.0.0 package version: 5.3.0+github.60.1.
dotnet add package MetaBrainz.MusicBrainz.DiscId --version 5.3.0
                    
NuGet\Install-Package MetaBrainz.MusicBrainz.DiscId -Version 5.3.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="MetaBrainz.MusicBrainz.DiscId" Version="5.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MetaBrainz.MusicBrainz.DiscId" Version="5.3.0" />
                    
Directory.Packages.props
<PackageReference Include="MetaBrainz.MusicBrainz.DiscId" />
                    
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 MetaBrainz.MusicBrainz.DiscId --version 5.3.0
                    
#r "nuget: MetaBrainz.MusicBrainz.DiscId, 5.3.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 MetaBrainz.MusicBrainz.DiscId@5.3.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=MetaBrainz.MusicBrainz.DiscId&version=5.3.0
                    
Install as a Cake Addin
#tool nuget:?package=MetaBrainz.MusicBrainz.DiscId&version=5.3.0
                    
Install as a Cake Tool

MetaBrainz.MusicBrainz.DiscId Build Status NuGet Version

This is a .NET implementation of libdiscid.

The main point of divergence at this point is that fewer platforms are supported (see below), and that this library supports retrieval of CD-TEXT information.

It uses PInvoke to access devices so is platform-dependent; currently, Windows, Linux and FreeBSD are supported.

Support for macOS is unlikely, because I have no access to a system.

Debugging

The TableOfContents class provides a TraceSource that can be used to configure debug output; its name is MetaBrainz.MusicBrainz.DiscId.

Configuration

In Code

In code, you can enable tracing like follows:

// Use the default switch, turning it on.
TableOfContents.TraceSource.Switch.Level = SourceLevels.All;

// Alternatively, use your own switch so multiple things can be
// enabled/disabled at the same time.
var mySwitch = new TraceSwitch("MyAppDebugSwitch", "All");
TableOfContents.TraceSource.Switch = mySwitch;

// By default, there is a single listener that writes trace events to
// the debug output (typically only seen in an IDE's debugger). You can
// add (and remove) listeners as desired.
var listener = new ConsoleTraceListener {
  Name = "MyAppConsole",
  TraceOutputOptions = TraceOptions.DateTime | TraceOptions.ProcessId,
};
TableOfContents.TraceSource.Listeners.Clear();
TableOfContents.TraceSource.Listeners.Add(listener);
In Configuration

Your application can also be set up to read tracing configuration from the application configuration file. To do so, the following needs to be added to its startup code:

System.Diagnostics.TraceConfiguration.Register();

(Provided by the System.Configuration.ConfigurationManager package.)

The application config file can then have a system.diagnostics section where sources, switches and listeners can be configured.

<configuration>
  <system.diagnostics>
    <sharedListeners>
      <add name="console" type="System.Diagnostics.ConsoleTraceListener" traceOutputOptions="DateTime,ProcessId" />
    </sharedListeners>
    <sources>
      <source name="MetaBrainz.MusicBrainz.DiscId" switchName="MetaBrainz.MusicBrainz.DiscId">
        <listeners>
          <add name="console" />
          <add name="discid-log" type="System.Diagnostics.TextWriterTraceListener" initializeData="discid.log" />
        </listeners>
      </source>
    </sources>
    <switches>
      <add name="MetaBrainz.MusicBrainz.DiscId" value="All" />
    </switches>
  </system.diagnostics>
</configuration>

Release Notes

These are available on GitHub.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 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.
  • net8.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
5.3.0 96 2/11/2026
5.2.0 293 10/6/2025
5.1.0 52 10/5/2025
5.0.0 80 10/5/2025
4.0.0 880 12/13/2023
3.0.0 2,216 11/20/2021
2.0.1 491 4/17/2020
2.0.0 362 3/22/2020
1.0.1 1,162 11/15/2018
1.0.0 1,733 1/21/2018