{"record":{"id":"d85c8b11797763f3","repo":"dotnet/reactive","slug":"failed-to-find-rx-assembly","errorCode":null,"errorMessage":"Failed to find Rx assembly","messagePattern":"Failed to find Rx assembly","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Test/Gauntlet/Checks/PlugIns/PlugIn/PlugInEntryPoint.RxInfo.cs","lineNumber":16,"sourceCode":"﻿// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT License.\n// See the LICENSE file in the project root for more information. \n\nusing PlugIn.Api;\nusing System.Reflection;\nusing System.Reactive.Linq;\n\nnamespace PlugInTest;\n\n// Note: this file is compiled into all of the plug-ins:\n//  * the .NET 4.5 and .NET 4.6 plug-ins\n//  * all versions of Rx.NET\npublic partial class PlugInEntryPoint : IRxPlugInApi\n{\n    public string GetRxFullName() => typeof(Observable).Assembly.FullName ?? throw new InvalidOperationException(\"Failed to find Rx assembly\");\n    public string GetRxLocation() => typeof(Observable).Assembly.Location;\n    public string GetRxTargetFramework() => typeof(Observable).Assembly?.GetCustomAttribute<System.Runtime.Versioning.TargetFrameworkAttribute>()?.FrameworkName ?? throw new InvalidOperationException(\"Failed to find TargetFrameworkAttribute on Rx assembly\");\n}\n","sourceCodeStart":1,"sourceCodeEnd":20,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Test/Gauntlet/Checks/PlugIns/PlugIn/PlugInEntryPoint.RxInfo.cs#L1-L20","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Rebuild the plug-in host and plug-ins so System.Reactive.dll is present in each plug-in's bin output","Verify the Rx assembly loads (fusion log / AppDomain.AssemblyLoad) in the failing runtime","Ensure the plug-in references the same Rx version as the host driver"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"var asm = typeof(Observable).Assembly;\nif (string.IsNullOrEmpty(asm.FullName) || asm.Location.Length == 0)\n    throw new InvalidOperationException(\"Rx assembly not loaded correctly\");","typeGuard":null,"tryCatchPattern":"try { var name = entry.GetRxFullName(); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"Failed to find Rx assembly\")) { /* inspect assembly load context / fusion log */ }","preventionTips":["Keep Rx binaries copied to plug-in output (CopyLocal/PackageReference)","Use the same System.Reactive version across host and plug-ins","Run Gauntlet checks from the standard build layout"],"tags":["rx","test-infrastructure","assembly-loading","gauntlet"],"backgroundTag":"missing-dependency","analyzedSha":"94b5d5ab912789f5abe9a72138a25bbd716fe59c","analyzedAt":"2026-09-15T02:26:24.759Z","contentChangedAt":"2026-09-15T02:26:24.759Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}