Skip to content

[dotnet-sdk-11.0.100-preview.4.26214.103] GlobalToolsNETCore22 throws System.TypeLoadException when running nrepo -n:newrepo #126994

Closed

Description

@WeiweiCaiAcpt

Description

When installing "NukedBit.NRepo" global tool with the latest build dotnet-sdk-11.0.100-preview.4.26214.103, an unhandled System.TypeLoadException occurs when running nrepo -n:newrepo:
Unhandled exception. System.TypeLoadException: Method 'UseServiceProviderFactory' in type 'Microsoft.Extensions.Hosting.HostBuilder' from assembly 'Microsoft.Extensions.Hosting, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.

Reproduction Steps

Repro Steps:
Only Install dotnet-sdk-11.0.100-preview.4.26214.103 on your machine.

  1. Open cmd.exe from %windir%\System32.
    2.Input install command:"dotnet tool install --global NukedBit.NRepo".
    3.Press keyboard ‘Enter’.
    4.Verify: it install successfully.
    5.Input “set NREPO_GITHUB_TOKEN=(input your github token)”.
    6.Press keyboard “Enter”
    7.Input “nrepo -n:newrepo”
    8.Press keyboard “Enter””

Expected behavior

Executes successfully.

Actual behavior

Running "nrepo -n:newrepo" with an unhandled exception:
Unhandled exception. System.TypeLoadException: Method 'UseServiceProviderFactory' in type 'Microsoft.Extensions.Hosting.HostBuilder' from assembly 'Microsoft.Extensions.Hosting, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
at NukedBit.NRepo.Program.Main(String[] args)
at NukedBit.NRepo.Program.Main(String[] args)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at NukedBit.NRepo.Program.Main(String[] args)
at NukedBit.NRepo.Program.

(String[] args)
at System.Environment.CallEntryPoint(IntPtr entryPoint, String[]* pArgument, Int32* pReturnValue, Boolean captureException, Exception* pException)

Regression?

Yes.

Verify Scenarios:
1). Windows 11 24H2 AMD64 + dotnet-sdk-11.0.100-preview.4.26214.103: Fail
2). Windows 11 24H2 AMD64 + dotnet-sdk-11.0.100-preview.4.26210.111: Fail
3). Windows 11 24H2 AMD64 + dotnet-sdk-11.0.100-preview.3.26207.106: Pass

Known Workarounds

No response

Configuration

Application Name: GlobalToolsNETCore22
OS: Windows 11 25H2
CPU: X64
.NET Build Number: dotnet-sdk-11.0.100-preview.4.26214.103

dotnet --info

.NET SDK:
Version: 11.0.100-preview.4.26214.103
Commit: b94d039caa
Workload version: 11.0.100-manifests.d6ec7560
MSBuild version: 18.7.0-preview-26214-103+b94d039ca

Runtime Environment:
OS Name: Windows
OS Version: 10.0.26200
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\11.0.100-preview.4.26214.103\

Host:
Version: 11.0.0-preview.4.26214.103
Architecture: x64
Commit: b94d039caa

.NET SDKs installed:
11.0.100-preview.4.26214.103 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 11.0.0-preview.4.26214.103 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 11.0.0-preview.4.26214.103 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 11.0.0-preview.4.26214.103 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other information

@dotnet-actwx-bot @dotnet/compat

Activity

  1. added
    untriaged
    on Apr 16, 2026
  2. dotnet-policy-service commented on Apr 16, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-extensions-hosting
    See info in area-owners.md if you want to be subscribed.

  3. jkotas commented on Apr 16, 2026

    @jkotas
    Member

    @ericstj Looks like a regression from dotnet/dotnet#5206

  4. self-assigned this
    on Apr 20, 2026
  5. removed
    untriaged
    on Apr 20, 2026
  6. ericstj commented on Apr 20, 2026

    @ericstj
    Member

    Yes, this is an unfortunate breaking change from dotnet/extensions#637. @jkotas I don't suppose we can use a DIM here to fix this? Let me give that a try.

  7. WeiweiCaiAcpt commented on Apr 28, 2026

    @WeiweiCaiAcpt
    Author

    @jkotas @ericstj When running with dotnet-sdk-11.0.100-preview.4.26224.122, the System.TypeLoadException is no longer reproducible; however, a new System.MissingMethodException has surfaced. We’ve filed a new bug for this issue. Could you please help take a look?

  8. ericstj commented on Apr 28, 2026

    @ericstj
    Member

    I had a look. For unblocking this particular app I suggest we just update the dependencies. The app isn't seeing a ton of usage or activity in the source repo -- maybe it should be dropped from the compat suite?

  9. locked and limited conversation to collaborators on May 29, 2026
  10. added this to the 11.0.0 milestone on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions