Net2TypeScript 9.0.1

dotnet tool install --global Net2TypeScript --version 9.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Net2TypeScript --version 9.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Net2TypeScript&version=9.0.1
                    
nuke :add-package Net2TypeScript --version 9.0.1
                    

Net2TypeScript

.NET tool to generate TypeScript interfaces/enums from .NET assembly classes/interfaces/enums

.NET tool command

Description:
  .NET tool to create TypeScript types/models from .NET models

Usage:
  net2typescript [options]

Avaliable options

Options:
  -s|--settings         Path to JSON settings file that uses the settings "$schema" (see
                        schema URL below). If argument is omitted, the settings file is expected
                        to be found in the same folder as the Net2TypeScript executable with the
                        file name "settings.json".

  -c|--configuration    The build configuration (e.g. 'Release'/'Debug').
                        Emitting this parameter, enables interpolation of $(BuildConfiguration)
                        variables in the JSON settings file's path properties.
                        This is particularily useful when you want to pick assembly files from
                        different folders dynamically for different build configurations.
                        Defaults to 'Debug' when argument is omitted.

  -t|--targetframework  The target framework (e.g. 'net9.0').
                        Emitting this parameter, enables interpolation of $(TargetFramework)
                        variables in the JSON settings file's path properties.
                        This is particularily useful when you want to pick assembly files from
                        different folders dynamically for different target frameworks.

  --*                   All global properties (of "primitive" value types) in the settings file
                        schema can be set or overriden using command line arguments as an
                        alternative to using the settings file.

  -h|--help             Show this help information.

JSON schema for settings file:
https://raw.githubusercontent.com/josundt/Net2TypeScript/master/Net2TypeScript/settings.schema.json```

Sample settings file

{
  "$schema": "https://raw.githubusercontent.com/josundt/Net2TypeScript/master/Net2TypeScript/settings.schema.json",
  "assemblyPaths": [
    "./bin/$(BuildConfiguration)/net6.0/My.App.Models.dll",
    "../My.App.ApiModels/bin/$(BuildConfiguration)/netstandard2.0/My.App.ApiModels.dll"
  ],
  "outputPath": "../My.App.Spa/src/models/models.ts",
  "dotNetRootNamespace": "My.App",
  "tsRootNamespace": null,
  "tsFlattenNamespaces": true,
  "classNamespaceFilter": [
    "My.App.Models*",
    "My.App.ApiModels*"
  ],
  "enumNamespaceFilter": [
    "My.App.Models*",
    "My.App.ApiModels*"
  ],
  "indent": "    ",
  "enumType": "stringIfNotFlagEnum",
  "enumFormat": "enum",
  "camelCase": true,
  "excludeClass": false,
  "excludeInterface": true,
  "nullableReferenceTypes": true,
  "namespaceOverrides": {
    "My.App.ApiModels*": {
      "nullableReferenceTypes": false
    }
  },
  "classOverrides": {
    "My.App.ApiModels.PersonLocation": {
      "extraProperties": {
        "location": "import(\"./geography-point.js\").IGeographyPoint"
      }
    }
  }
}
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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
9.0.1 161 9/6/2025
9.0.0 5,067 11/14/2024
8.0.1 5,571 4/10/2024
8.0.0 6,189 11/30/2023
7.0.4 4,734 4/27/2023
7.0.3 248 4/25/2023
7.0.2 252 4/25/2023
7.0.1 2,562 12/4/2022
7.0.0 474 11/8/2022
6.0.14 6,614 3/22/2022
6.0.12 547 3/20/2022
6.0.11 514 3/20/2022
6.0.10 509 3/20/2022