CsCom.Runtime 4.1.0

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

CsCom.Runtime

The support code of the COM interop code that CsCom generates: IDispatch and IEnumVARIANT, ComActivator, the marshallers of VARIANTs, SAFEARRAYs, BSTRs, DATE and CURRENCY, the base class of the late-bound wrappers of dispinterfaces, and the event sinks. It is built on the source-generated COM interop of .NET, for .NET 10 and .NET 11, and can be trimmed and compiled with Native AOT.

Usage

It is rarely referenced by hand: the projects that cscom project create generates reference it, and the CsCom.Build package depends on it. With --support-code public or internal (CsComSupportCode of CsCom.Build), the support code is generated into the project instead, which then does not need this package.

Its API is also there for the code that uses the generated types, e.g. to create a COM object or to get one that is running:

using CsCom.Runtime;
using Interop.Excel; // generated from the type library of Excel

_Application excel = ComActivator.CreateInstance<_Application>("Excel.Application");
_Application running = ComActivator.GetActiveInstance<_Application>("Excel.Application");

Documentation

See cscom.fedarovich.com: Support code, Generated code and the API reference.

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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CsCom.Runtime:

Package Downloads
CsCom.Build

Generates source-generated COM interop code from type libraries and interop assemblies during the build: add the type libraries, ProgIDs, LIBIDs or interop assemblies as CsComReference items. With CsComExportTypeLibrary, it also exports the type library of the project after the compilation, like TlbExp.

CsCom.Runtime.Dynamic

Late binding with C# dynamic for the COM interop code generated by CsCom: ComActivator.CreateDynamicInstance, AsDynamic and the events of dynamic objects.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.1.0 124 11/25/2026
4.0.0 123 11/21/2026
4.0.0-rc.2 77 11/20/2026
4.0.0-rc.1 73 11/20/2026
3.0.0 123 11/13/2026
3.0.0-rc.1 74 11/13/2026
3.0.0-beta.2 72 11/13/2026
3.0.0-beta.1 69 11/13/2026
3.0.0-alpha1 110 11/12/2026
2.0.0 114 11/11/2026
2.0.0-beta.1 69 11/10/2026
2.0.0-alpha.1 73 11/2/2026
1.0.0 116 10/30/2026
1.0.0-beta.3 81 10/29/2026
1.0.0-beta.2 68 10/28/2026
1.0.0-beta.1 74 10/28/2026