Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

System.Reflection.TargetInvocationException #130

Open
Labels
bugSomething isn't working
@kairlec

Description

@kairlec

我使用的版本是1.0.115603
当我使用dotnet-core-uninstall list命令时,事实上我使用任意正确命令,其都会报该错误

Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.   at Microsoft.DotNet.Tools.Uninstall.Windows.RegistryQuery.IsDotNetCoreBundle(RegistryKey registryKey)   at Microsoft.DotNet.Tools.Uninstall.Windows.RegistryQuery.<>c.<GetAllInstalledBundles>b__1_1(RegistryKey bundle)   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()   at System.Linq.Enumerable.WhereEnumerableIterator`1.ToList()   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)   at Microsoft.DotNet.Tools.Uninstall.Windows.RegistryQuery.GetAllInstalledBundles()   at Microsoft.DotNet.Tools.Uninstall.Shared.Commands.ListCommandExec.Execute(IBundleCollector bundleCollector)   at Microsoft.DotNet.Tools.Uninstall.Shared.Configs.CommandLineConfigs.<>c__DisplayClass40_0.<.cctor>b__4()   at Microsoft.DotNet.Tools.Uninstall.Shared.Exceptions.ExceptionHandler.<>c__DisplayClass0_0.<HandleException>b__0()   --- End of inner exception stack trace ---   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)   at System.Delegate.DynamicInvokeImpl(Object[] args)   at System.Delegate.DynamicInvoke(Object[] args)   at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseParseErrorReporting>b__22_0>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.CommandLine.Invocation.InvocationExtensions.<>c__DisplayClass8_0.<<UseTypoCorrections>b__0>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseSuggestDirective>b__7_0>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseParseDirective>b__6_0>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseHelp>b__20_0>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass4_0.<<UseVersionOption>b__0>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<RegisterWithDotnetSuggest>b__23_0>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.CommandLine.Invocation.InvocationExtensions.<>c__DisplayClass5_0.<<UseExceptionHandler>b__0>d.MoveNext()

我的notnet --info信息如下

.NET Core SDK(反映任何 global.json): Version:   3.1.101 Commit:    b377529961运行时环境: OS Name:     Windows OS Version:  10.0.18363 OS Platform: Windows RID:         win10-x64 Base Path:   C:\Program Files\dotnet\sdk\3.1.101\Host (useful for support):  Version: 3.1.1  Commit:  a1388f194c.NET Core SDKs installed:  3.1.101 [C:\Program Files\dotnet\sdk].NET Core runtimes installed:  Microsoft.AspNetCore.All 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]  Microsoft.AspNetCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]  Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]  Microsoft.NETCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]  Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]  Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]To install additional .NET Core runtimes or SDKs:  https://aka.ms/dotnet-download

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp