dotnet/reactive · error · InvalidOperationException

Failed to find Rx assembly

Error message

Failed to find Rx assembly

What it means

The Gauntlet test plug-in reports the loaded Rx assembly's full name; since typeof(Observable).Assembly.FullName is nullable, it throws InvalidOperationException 'Failed to find Rx assembly' if the name cannot be obtained. This signals the Rx assembly failed to load properly in the plug-in's AppDomain/process.

Solutions

  1. Rebuild the plug-in host and plug-ins so System.Reactive.dll is present in each plug-in's bin output
  2. Verify the Rx assembly loads (fusion log / AppDomain.AssemblyLoad) in the failing runtime
  3. Ensure the plug-in references the same Rx version as the host driver
Defensive patterns

Strategy: try-catch

Validate before calling

var asm = typeof(Observable).Assembly;
if (string.IsNullOrEmpty(asm.FullName) || asm.Location.Length == 0)
    throw new InvalidOperationException("Rx assembly not loaded correctly");

Try / catch

try { var name = entry.GetRxFullName(); }
catch (InvalidOperationException ex) when (ex.Message.Contains("Failed to find Rx assembly")) { /* inspect assembly load context / fusion log */ }

Prevention

When it happens

Trigger: Running a Gauntlet plug-in host where System.Reactive (the assembly containing Observable) is missing, fails to load, or is loaded in a way that yields no assembly name.

Common situations: Gauntlet test runs against .NET Framework 4.5/4.6 plug-ins where Rx binaries were not copied to the plug-in output folder, mixed Rx versions on the probing path, or assembly-load failures masked by the null FullName.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of dotnet/reactive@94b5d5ab91 (2026-09-15). Data as JSON: /api/errors/d85c8b11797763f3. Report an issue: GitHub.

Appendix: source

Thrown at Rx.NET/Test/Gauntlet/Checks/PlugIns/PlugIn/PlugInEntryPoint.RxInfo.cs:16

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT License.
// See the LICENSE file in the project root for more information. 

using PlugIn.Api;
using System.Reflection;
using System.Reactive.Linq;

namespace PlugInTest;

// Note: this file is compiled into all of the plug-ins:
//  * the .NET 4.5 and .NET 4.6 plug-ins
//  * all versions of Rx.NET
public partial class PlugInEntryPoint : IRxPlugInApi
{
    public string GetRxFullName() => typeof(Observable).Assembly.FullName ?? throw new InvalidOperationException("Failed to find Rx assembly");
    public string GetRxLocation() => typeof(Observable).Assembly.Location;
    public string GetRxTargetFramework() => typeof(Observable).Assembly?.GetCustomAttribute<System.Runtime.Versioning.TargetFrameworkAttribute>()?.FrameworkName ?? throw new InvalidOperationException("Failed to find TargetFrameworkAttribute on Rx assembly");
}

View on GitHub (pinned to 94b5d5ab91)