简体   繁体   中英

Microsoft EntityFramework Core CLI install - nuget exception

I am trying to install dotnet-ef globally on macos 10.15.6 dotnet tool install -g dotnet --version 3.1.6 I am getting nuget exception

"/var/folders/gt/9l4q1djd12d__wt0cxkqyrc80000gn/T/bw0oop0h.aau/restore.csproj" (Restore target) (1) ->
                   (Restore target) -> 
                     /usr/local/share/dotnet/sdk/3.1.302/NuGet.targets(128,5): error : Object reference not set to an instance of an object. [/var/folders/gt/9l4q1djd12d__wt0cxkqyrc80000gn/T/bw0oop0h.aau/restore.csproj]

The exception is happening here:

 System.NullReferenceException: Object reference not set to an instance of an object.
                        at NuGet.Protocol.ServiceIndexResourceV3Provider.GetServiceIndexResourceV3(SourceRepository source, DateTime utcNow, ILogger log, CancellationToken token)

and here is a screenshot for the entire stack在此处输入图像描述

I spent 3 days with this. I would appreciate any kind of help

I solved the problem after intensive SDK/Runtime uninstalling process combining dotnet uninstall tool and manual chasing and removing for folders and install everything all over again. Uninstalling tool doesn't remove cache folders which is a huge problem considering that the problem by large affected by caching in my opinion. I seached on mac on everything with dotnet nuget entityframework and removed it manually case the tool don't really remove everything. Depending on the uninstall tool alone didn't help me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM