InSimDotNet.NET 6.5.4.1

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

InSim.NET for .NET 6 / .NET 8

This is a fork of InSim.NET ported to .NET 6 / .NET 8.

  • master branch — .NET Framework 4.8 (classic)
  • net6 branch — .NET 6 / .NET 8 (this branch)

The original documentation still applies for core InSim usage.


Installation

Reference the NuGet package in your project.

If you get runtime errors about missing assemblies, add these to your .csproj:

<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />

Quick Start

InSim insim = new InSim();

insim.Bind<IS_MSO>(MessageOut);

insim.Initialize(new InSimSettings {
    Host = "127.0.0.1",
    Port = 29999,
    Admin = string.Empty,
});

while (insim.IsConnected)
    Thread.Sleep(200);

void MessageOut(InSim insim, IS_MSO packet) {
    Console.WriteLine(packet.Msg);
}

Car Setup Validation — CarSetupHelper

This fork adds CarSetupHelper in the InSimDotNet.Helpers namespace for comparing car setups received via IS_SET against a reference .set file.

Basic usage

// Load the reference .set file bytes
byte[] referenceSetBytes = File.ReadAllBytes("reference.set");

// Bind the IS_SET packet event
insim.Bind<IS_SET>(OnCarSetup);

void OnCarSetup(InSim insim, IS_SET packet) {
    var diffs = CarSetupHelper.CompareSetups(referenceSetBytes, packet);
    if (diffs.Count == 0) {
        Console.WriteLine("Setup matches the reference.");
    } else {
        foreach (var d in diffs)
            Console.WriteLine($"{d.Field}: expected {d.ExpectedValue}, got {d.ActualValue}");
    }
}

SetupDifference

Each entry in the returned list has:

Property Type Description
Field SetupField Enum value identifying the differing field
ExpectedValue string Human-readable value from the reference setup
ActualValue string Human-readable value from the driver's setup

SetupField enum

All comparable fields:

ExtraWeight, IntakeRestriction, ExtraWeightDistribution
RearWing, FrontWing
BrakePower, BrakeDistribution, Handbrake, AntiLockBrakesActive
MaxSteeringAngle, SteeringParallel, FrontToe, RearToe, Caster
FinalDriveRatio, Gear1–Gear7
FrontDifferentialType, FrontDifferentialPreload, FrontDifferentialPowerLock,
  FrontDifferentialCoastLock, FrontDifferentialViscosity
RearDifferentialType, RearDifferentialPreload, RearDifferentialPowerLock,
  RearDifferentialCoastLock, RearDifferentialViscosity
CenterDifferentialType, CenterDifferentialViscosity, CenterDifferentialPowerSplit
TractionControlActive, TractionControlSlipAllowed, TractionControlMinSpeed
FrontSuspensionHeight, FrontSuspensionStiffness, FrontSuspensionBumpDamper,
  FrontSuspensionReboundDamper, FrontSuspensionAntiRollBar
RearSuspensionHeight, RearSuspensionStiffness, RearSuspensionBumpDamper,
  RearSuspensionReboundDamper, RearSuspensionAntiRollBar
WheelManufacturer
FrontTyreCompound, RearTyreCompound, FrontTyreSize, RearTyreSize
FrontLeftTyrePressure, FrontRightTyrePressure, RearLeftTyrePressure, RearRightTyrePressure
FrontLeftCamber, FrontRightCamber, RearLeftCamber, RearRightCamber
Passenger, CarConfig

Parsing a setup file directly

byte[] bytes = File.ReadAllBytes("mysetup.set");
CarSetupHelper.ParsedCarSetup parsed = CarSetupHelper.ParseSetup(bytes, isFile: true);
Console.WriteLine($"Rear wing: {parsed.RearWing}");
Console.WriteLine($"TC min speed: {parsed.TractionControlMinSpeed} m/s");

Comparing two parsed setups

var expected = CarSetupHelper.ParseSetup(refBytes, isFile: true);
var actual   = CarSetupHelper.ParseSetup(actualBytes, isFile: true);
var diffs    = CarSetupHelper.CompareSetups(expected, actual);

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

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
6.5.4.1 121 6/28/2026
6.5.3.1 130 6/9/2026
6.5.2.1 117 5/3/2026
6.5.1.2 136 4/22/2026
6.5.1.1 112 4/20/2026
6.4.1.1 127 3/25/2026
6.3.2.1 128 2/14/2026
6.3.1.1 133 2/13/2026
6.2.1.1 170 12/26/2025
6.1.1.1 208 12/24/2025
6.0.4.1 230 10/27/2025
6.0.3.1 230 3/2/2025