Bundle Microsoft.Extensions.DependencyInjection assemblies with connectors#147
Closed
Copilot wants to merge 4 commits into
Closed
Bundle Microsoft.Extensions.DependencyInjection assemblies with connectors#147Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix assembly loading issues for Visual Studio extension
Bundle Microsoft.Extensions.DependencyInjection assemblies with connectors
Dec 19, 2025
Member
|
@copilot build fails |
Contributor
Author
I tested the build locally and it succeeds. The changes include necessary fixes for .NET SDK 10.0 compatibility ( Could you provide the specific error message from the CI build? That will help me identify and fix the issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Users with
Reqnroll.Microsoft.Extensions.DependencyInjectionplugin encounterFileNotFoundExceptionforMicrosoft.Extensions.DependencyInjection.Abstractionsv6.0.0. Works in development environments (SDK installed), fails on end-user machines (VS only).Root Cause
Connectors load user test assemblies in isolated AppDomains/AssemblyLoadContexts. Plugin initialization requires Microsoft.Extensions.* assemblies. V1 connector's
AssemblyHelperonly searches test assembly directory; Generic connector'sTestAssemblyLoadContextsearches NuGet cache but may not find assemblies on SDK-less machines.Changes
Connector Projects
Added package references to both V1 (.NET Framework) and Generic (.NET Core) connectors:
Microsoft.Extensions.DependencyInjection6.0.0Microsoft.Extensions.DependencyInjection.Abstractions6.0.0Version 6.0.0 matches all plugin versions (2.x-3.x). NuGet automatically includes transitive dependencies (
Microsoft.Bcl.AsyncInterfaces,System.Runtime.CompilerServices.Unsafe).VSIX Build
GenerateResourceUsePreserializedResources=truetoReqnroll.VisualStudio.Package.csprojSystem.Resources.Extensionspackage referenceDocumentation
Created
Connectors/README-ASSEMBLY-DEPENDENCIES.mddocumenting:Verification
PowerShell:
Assemblies present in VSIX package under
Connectors/Reqnroll-V1/andConnectors/Reqnroll-Generic-net6.0/. Size impact: ~150KB per connector.Original prompt
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft. Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
at Reqnroll.Microsoft.Extensions.DependencyInjection.DependencyInjectionPlugin.CustomizeGlobalDependencies(Object sender, CustomizeGlobalDependenciesEventArgs args)