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.
- 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
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.
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:
(String[] args)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.
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