CodeBrix.SvgParse.MsplLicenseForever 1.0.238.355

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

CodeBrix.SvgParse

An SVG document object model (DOM) library for .NET. CodeBrix.SvgParse provides comprehensive SVG parsing, element modeling, styling, and serialization capabilities, and is provided as a .NET 10 library and associated CodeBrix.SvgParse.MsplLicenseForever NuGet package.

CodeBrix.SvgParse supports applications and assemblies that target Microsoft .NET version 10.0 and later. Microsoft .NET version 10.0 is a Long-Term Supported (LTS) version of .NET, and was released on Nov 11, 2025; and will be actively supported by Microsoft until Nov 14, 2028. Please update your C#/.NET code and projects to the latest LTS version of Microsoft .NET.

CodeBrix.SvgParse is a fork of the code of the open source Svg.Custom project (part of the Svg.Skia projects) - see below for licensing details.

Installation

dotnet add package CodeBrix.SvgParse.MsplLicenseForever

Note that the NuGet package ID and the namespace are different - there is no package named plain CodeBrix.SvgParse:

  • NuGet package ID: CodeBrix.SvgParse.MsplLicenseForever
  • Assembly and namespace: CodeBrix.SvgParse - i.e. using CodeBrix.SvgParse;

This package has one NuGet dependency, CodeBrix.StyleSheetParse.MitLicenseForever, which NuGet restores automatically and which is used for the CSS styling support. There are no native libraries and no other dependencies. XML documentation (IntelliSense) ships alongside the assembly.

CodeBrix.SvgParse supports:

  • SVG document loading from files, streams, strings, and XmlReaders
  • Complete SVG 1.1 element hierarchy (shapes, text, gradients, patterns, filters, etc.)
  • CSS styling with specificity-based cascading
  • SVG path parsing and manipulation
  • Transforms (translate, rotate, scale, skew, matrix)
  • Clipping and masking
  • Filter effects (blur, blend, color matrix, lighting, etc.)
  • Linear and radial gradients with stop colors
  • Pattern fills
  • Text elements with font properties and text paths
  • Markers on shapes
  • Deep cloning of elements and documents
  • Security controls for external resource loading
  • Many more...

CodeBrix.SvgParse is a document object model, not a renderer: nothing is drawn. It does not rasterize or export to PNG, JPEG or PDF, play animations, perform hit testing, measure text or load fonts, or compute geometry such as bounding boxes and path flattening. Rendering is the job of a backend built on top of this DOM - CodeBrix.SkiaSvg is one such backend.

Sample Code

Load and Inspect an SVG Document

using CodeBrix.SvgParse;

var document = SvgDocument.Open("image.svg");

Console.WriteLine($"Width: {document.Width}");
Console.WriteLine($"Height: {document.Height}");

foreach (var element in document.Descendants())
{
    // There is no public element.ElementName; identify elements by CLR type.
    Console.WriteLine($"Element: {element.GetType().Name} id={element.ID}");
}

Load SVG from a String

using System.Linq;
using CodeBrix.SvgParse;

var svg = "<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'>" +
          "<circle cx='50' cy='50' r='40' fill='red'/></svg>";

var document = SvgDocument.FromSvg<SvgDocument>(svg);
var circle = document.Descendants().OfType<SvgCircle>().First();
Console.WriteLine($"Circle radius: {circle.Radius}");

Find Elements by ID

using CodeBrix.SvgParse;

var document = SvgDocument.Open("image.svg");
var element = document.GetElementById("myElement");

if (element is SvgRectangle rect)
{
    Console.WriteLine($"Rectangle: {rect.Width} x {rect.Height}");
}

Documentation

The NuGet package includes AGENT-README.txt, a complete API reference and usage guide written for AI coding agents - point your agent at that file when it is writing code against this library.

Additional sample code and usage examples are available in the CodeBrix.SvgParse.Tests project: https://github.com/ellisnet/CodeBrix.SvgParse/tree/main/tests/CodeBrix.SvgParse.Tests

Note that the test project has InternalsVisibleTo access to the library, so some of what it calls (for example SvgElement.ElementName and SvgElement.Attributes) is internal and is not available to package consumers.

License

The project is licensed under the Microsoft Public License (Ms-PL). see: https://en.wikipedia.org/wiki/Shared_Source_Initiative#Microsoft_Public_License_(Ms-PL)

All code originating from Svg.Custom (part of the Svg.Skia projects) was included as required by the Microsoft Public License (Ms-PL) - as of Svg.Skia version 4.2.0. This project (CodeBrix.SvgParse) complies with all provisions of the source code license of Svg.Custom (Ms-PL).

Product 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.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CodeBrix.SvgParse.MsplLicenseForever:

Package Downloads
CodeBrix.SkiaSvg.MitLicenseForever

A cross-platform SVG rendering library for .NET built on SkiaSharp. Parses SVG documents into an intermediate representation and renders them to SkiaSharp canvases, bitmaps, and other output formats. Supports text shaping via HarfBuzz, SVG animations, and CSS styling.

CodeBrix.Imaging.Drawing.NoSkia.ApacheLicenseForever

The fully managed, zero-native-dependency companion of CodeBrix.Imaging.Drawing: the same stroke-based drawing, painting and highlighting API, SkiaSharp-workalike drawing types (DrawingCanvas, DrawingBitmap, DrawingPaint, DrawingPath, gradients, blend modes, clipping, save-layers), and SVG rendering - all rasterized entirely in managed code on CodeBrix.Imaging pixel buffers. No SkiaSharp, no Skia native libraries, no native dependencies of any kind. Reference EITHER this package OR CodeBrix.Imaging.Drawing.ApacheLicenseForever, never both: they compile the same drawing-session sources into the same namespaces.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.238.355 102 8/26/2026
1.0.238.103 53 8/26/2026
1.0.165.135 760 6/14/2026
1.0.117 184 4/29/2026
1.0.102 139 4/14/2026