Experimental.System.Messaging 1.2.0

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

Experimental.System.Messaging

Experimental port of System.Messaging (for .NET Core)

NuGet Version NuGet Downloads Build License

Introduction

This package is an unofficial port of the .NET Framework System.Messaging assembly for .NET Core/.NET 8+ applications running on Windows. It is provided for development convenience. If Microsoft officially releases an MSMQ client package, you should migrate to the official package.

The source code for this package is derived from the .NET Framework reference source code.

License Notice

This project is licensed under the Microsoft Reciprocal License (Ms-RL).

The original source code was obtained from Microsoft Reference Source (referencesource.microsoft.com) when it was available under the Ms-RL license. Due to insufficient understanding at the time, this package was mistakenly distributed under the MIT License from its initial release until version 1.1.0. We sincerely apologize for this error and have corrected the license to Ms-RL starting from version 1.2.0.

As a derivative work based on Ms-RL licensed code, this package must also be distributed under Ms-RL in accordance with the license terms.

Disclaimer

This source code is based on Microsoft's Reference Source, but may contain differences from the original. Bug fixes have been applied in the public interest based on community-reported issues. If Microsoft officially releases an MSMQ client package for .NET Core/.NET 5+, that official package should take priority over this experimental package. Users are encouraged to migrate to the official package when it becomes available.

Queue Path Formats

The MessageQueue constructor accepts various path formats. Below are common formats you can use:

Local Queue Paths

// Local private queue
var queue = new MessageQueue(@".\Private$\MyQueue");

// Local private queue using machine name
var queue = new MessageQueue(@"MachineName\Private$\MyQueue");

Remote Queue Paths (Format Names)

To connect to remote queues, use the direct format name syntax:

// Using TCP (recommended for remote queues)
var queue = new MessageQueue(@"FormatName:Direct=TCP:192.168.1.100\Private$\MyQueue");

// Using OS (uses Windows networking)
var queue = new MessageQueue(@"FormatName:Direct=OS:RemoteMachineName\Private$\MyQueue");

// Using HTTP (requires MSMQ HTTP support)
var queue = new MessageQueue(@"FormatName:Direct=HTTP://hostname/msmq/Private$/MyQueue");

// Using HTTPS
var queue = new MessageQueue(@"FormatName:Direct=HTTPS://hostname/msmq/Private$/MyQueue");

Format Name Syntax Reference

Protocol Format Example
TCP FormatName:Direct=TCP:address\queue FormatName:Direct=TCP:192.168.1.100\Private$\MyQueue
OS FormatName:Direct=OS:machine\queue FormatName:Direct=OS:Server01\Private$\MyQueue
HTTP FormatName:Direct=HTTP://host/msmq/queue FormatName:Direct=HTTP://server/msmq/Private$/MyQueue
HTTPS FormatName:Direct=HTTPS://host/msmq/queue FormatName:Direct=HTTPS://server/msmq/Private$/MyQueue

Public Queues

// Local public queue
var queue = new MessageQueue(@"MachineName\MyPublicQueue");

// Remote public queue using format name
var queue = new MessageQueue(@"FormatName:Direct=TCP:192.168.1.100\MyPublicQueue");

Important Notes

  • When using TCP format, use the IP address or hostname directly after TCP: without brackets
  • For private queues, always include Private$ in the path
  • Remote queue access requires appropriate firewall rules and MSMQ configuration on the remote machine
  • The Direct format bypasses Active Directory lookup, making it suitable for workgroup environments

Release Note

v1.2.0 (2025-11-30)

  • Local changes: Miscellaneous local updates ? cleaned up project files (.csproj) and updated targeting to net8.0, adjusted CI/build workflow and test project compatibility, and made minor documentation edits.
  • Breaking Change: Changed target framework from netstandard2.0 to net8.0. Since MSMQ is a Windows-only technology, the original cross-platform targeting via .NET Standard was unnecessary. Mono has transitioned to WineHQ, .NET Framework already has native System.Messaging support, and other platforms (Silverlight, UWP, Unity) are not applicable targets for this library.
  • License Correction: Changed license from MIT to Ms-RL (Microsoft Reciprocal License) to properly comply with the original Microsoft Reference Source license terms.
  • Documentation: Revised terminology throughout the documentation. Replaced "counterfeit" with "unofficial port" to better reflect the legitimate nature of this community-maintained derivative work.
  • New Feature: Added support for setting access control on queue. Ported AccessControlEntry, AccessControlEntryType, AccessControlList, MessageQueueAccessControlEntry, MessageQueuePermission, MessageQueuePermissionAccess, MessageQueuePermissionEntry, and MessageQueuePermissionEntryCollection classes. (PR #5, contributed by @j0hnth0m)
  • Bug Fix: Fixed Unicode string null termination in StringToBytes method. This bug affected MessageQueue.Label, MessageQueue.MulticastAddress, Message.Label, Message.AuthenticationProviderName, and queue format name properties.

v1.1.0 (2019-11-06)

  • Breaking Change: Moved Trustee class namespace from System.Messaging to Experimental.System.Messaging.

v1.0.0 (2018-01-06)

  • Initial Release: Ported System.Messaging for .NET Core with minimal feature set. Excludes advanced features such as code access security, execute permissions, and Active Directory integration.
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 (10)

Showing the top 5 NuGet packages that depend on Experimental.System.Messaging:

Package Downloads
Ariane5

Package Description

MsmqExts

MSMQ (Microsoft Message Queuing) helper library

Rebus.Msmq.Experimental

Provides an MSMQ transport for Rebus

ArianeStandard

Package Description

Ariane5.Msmq

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 1,525 11/30/2025
1.1.0 1,548,104 11/6/2019
1.0.0 338,482 1/6/2018