SysML2.NET is a .NET implementation of the OMG SysML2 specification. SysML2.NET provides a number of libraries in the form of a C# SDK.
NOTE: Due to an error in the OMG published machine readable specifications, the current code is based on (generated from) https://github.com/Systems-Modeling/SysML-v2-Pilot-Implementation commit f1fd2b83e460f5695e8edcd780f43909f359d299 with comment
ST6RI-854 Updated metamodel files to latest Beta 4 version.
The packages are available on Nuget at:
The reference web-application is available on docker-hub. A demo-version is hosted at http://viewer.sysml2.net.
The generated HTML based meta-model documentation is availabe on docker-hub. A live version is available at https://modeldocs.sysml2.net.
GitHub actions are used to build and test the library
| Branch | Build Status |
|---|---|
| Master | |
| Development |
Every NuGet version is declared once, in Directory.Packages.props, using Central Package Management. A <PackageReference> in a project carries Include only — never Version.
Directory.Build.targets holds what Directory.Packages.props cannot: NuGet ignores asset metadata on <PackageVersion>, so the PrivateAssets / IncludeAssets of Microsoft.Sbom.Targets, coverlet.collector and coverlet.msbuild are centralized there through <PackageReference Update="…" />. The same file gives every packable project its PackageIcon and PackageReadmeFile, and packs cdp4-icon.png and README.md into the .nupkg; a project opts out by setting IsPackable to false.
The redistributable libraries multi-target netstandard2.1;net10.0, so a referenced version is a minimum floor for every downstream consumer. The version policy follows from that:
- Libraries (
SysML2.NET,SysML2.NET.Serializer.*,SysML2.NET.Dal,SysML2.NET.REST,SysML2.NET.Kpar,SysML2.NET.Extensions,SysML2.NET.Semantics) reference the lowest version that provides the APIs used. Stable framework abstractions stay at an LTS floor; serialization and cryptography packages track current. - Applications and test projects track current versions.
- A library dependency is raised only when a required new API needs it, or when a CVE affects that package.
The floored packages — Microsoft.Extensions.DependencyInjection.Abstractions, Microsoft.Extensions.Logging.Abstractions, System.Collections.Immutable, System.IO.Pipelines, plus the transitive Microsoft.NETCore.Platforms and Microsoft.NETCore.Targets — are by design permanently "outdated". They are listed in Directory.Packages.props and mirrored in IGNORE_PACKAGES in .github/workflows/nuget-reference-check.yml, which suppresses the outdated signal only: the deprecated and vulnerable checks still cover them.
A small number of metaclass operations that take a positional index — notably IActionUsage.Argument(int) and IActionUsage.InputParameter(int) — are 1-based, not 0-based. Argument(1) returns the first argument, and an index outside 1..count returns null.
This is intentional: these methods are the C# realization of normative OMG SysML v2 metamodel operations (ActionUsage::argument(i), ActionUsage::inputParameter(i)), which are 1-based per the specification and the pilot implementation. The SDK is generated as a faithful mirror of the metamodel, so these operations preserve the specification's indexing rather than adopting the C# 0-based convention.
For idiomatic 0-based access, use the underlying collections directly (e.g. InputParameters()), which are ordinary 0-based List<T>. The 1-based operations are a specification-aligned convenience on top of those lists.
As part of our commitment to security, transparency, and traceability the docker images and nuget packaves Software Bill of Materials (SBOM), the docker containers also contain Provenance information. These are automatically generated during the build process, providing detailed insights into the components, their licenses, versions, and the integrity of the nugets and docker images. What is Included:
- A comprehensive list of all open-source and third-party components included in the Docker images and nugets.
- Tracks software dependencies, licenses, and versions.
- Helps with vulnerability management by allowing users to quickly identify potential risks tied to specific components.
- A record of the image's origin and build process, providing traceability and assurance regarding the integrity of the image.
- This ensures that the image was built using the declared sources and under the specified conditions, helping verify its authenticity and consistency.
- Improved Transparency: Provides full visibility into the open-source and third-party components included in the image.
- Security Assurance: Enables easier tracking of vulnerabilities associated with specific components, promoting proactive security measures.
- Compliance: Ensures adherence to licensing requirements and simplifies audits of dependencies and build processes.
- Image Integrity: Provenance guarantees that the image is built as expected, without unauthorized modifications.
The SysML2.NET libraries and reference web-application are provided to the community under the Apache License 2.0. The solution contains files that contain information about the SysML2 metamodel which are distributed with the GNU Lesser General Public License (LGPL) v3.0.
Contributions to the code-base are welcome. However, before we can accept your contributions we ask any contributor to sign the Contributor License Agreement (CLA) and send this digitaly signed to s.gerene@stariongroup.eu. You can find the CLA's in the CLA folder.