Hi I was running my project using dotnet run and downloading the nugets from Azure doing dotnet restore --interactive but today I found some problems and I don’t know what is happening…
After that command nothing is happening. And If I cancel the command I’m receiving this warnings:
I have tried:
Cloning my projects again
Logout and login in Azure again
Cleaning using dotnet nuget locals all --clear and dotnet clear
dotnet info
.NET SDK:
Version: 8.0.107
Commit: 1bdaef7265
Workload version: 8.0.100-manifests.43c23f91
Runtime Environment:
OS Name: manjaro
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /usr/share/dotnet/sdk/8.0.107/
.NET workloads installed:
Workload version: 8.0.100-manifests.43c23f91
There are no installed workloads to display.
Host:
Version: 8.0.7
Architecture: x64
Commit: 2aade6beb0
.NET SDKs installed:
3.1.426 [/usr/share/dotnet/sdk]
7.0.120 [/usr/share/dotnet/sdk]
8.0.107 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Any help here or someone with the same problem?
Or any idea what more can I try, please?
thanks @linux-aarhus to try to help and sorry for the screenshots.
I was using https://github.com/Microsoft/artifacts-credprovider to get my artifacts from Azure.
I don’t know if it’s my project because we didn’t change anything.
In Windows works good too.
I’m suspecting if https://github.com/Microsoft/artifacts-credprovider changed something or now it’s broken because using this and then typing dotnet restore --interactive was working perfectly.
My knowledge in .NET is not high if you have an idea or alternative to do something, let me know, please
And thanks again for your time!
If this works then you have an dependency issue with cannot be resolved automagically.
If you have a project that depends on another project then updating one project may create circular issue where you cannot update either because it would break the opposite.
I solved this - in one case - by removing the dependency from my primary project (it is a nice 3rd party abstaction over JSInterop) - then update the dependency - addit back into the primary - then update the primary.
And this us just from one miror to the next e.g. 8.0.6 → 8.0.7
That is why I only have one dotnet SDK installed - if I add a third-party dependency then I fork the source and update it to use my SDK version - and I always ensure my code on the latest LTS.
That sometimes requires some change to the fork - but it is doable.
Thanks for trying to help.
I’m trying to downgrade to 8.0.6 to see if this was the problem but it’s a little bit difficult to me do the installation manually.
I don’t know why i’m downloading the .tar.gz and when I’m installing and moving the files only is detected the netcore and not aspnetcore.
I’m going to continue trying more things and if you don’t mind, and I get stuck somewhere in the installation, I could ask you here, since you have more experience than me in .NET and Linux. If not, it’s ok too…
Thanks again for your reply.
I’m suspecting my problem is for problems with access/authorization/roles in Azure Devops.
But i’m not sure. One of my colleagues told me has the same problem in his home (Windows user) but in the office we can work correctly. And the others colleagues no no problems.
I tried to generate new Personal Access Tokens, downgrade version and a lot of things but I cannot see any error.
After 10 min waiting, I can see this messages:
Determining projects to restore...
/home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Data/CitizenPortal.Data.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json. [/home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Api.sln]
/home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Services/CitizenPortal.Services.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json. [/home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Api.sln]
/home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Common.Data/CitizenPortal.Common.Data.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json. [/home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Api.sln]
/home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Api/CitizenPortal.Api.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json. [/home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Api.sln]
/home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Tests/CitizenPortal.Tests.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json. [/home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Api.sln]
/home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Crosscutting/CitizenPortal.Crosscutting.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json. [/home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Api.sln]
Failed to restore /home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Common.Data/CitizenPortal.Common.Data.csproj (in 10.09 min).
Failed to restore /home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Crosscutting/CitizenPortal.Crosscutting.csproj (in 10.09 min).
Failed to restore /home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Services/CitizenPortal.Services.csproj (in 10.09 min).
Failed to restore /home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Api/CitizenPortal.Api.csproj (in 10.09 min).
Failed to restore /home/diego/Repos/CitizenPortal/CitizenPortalApi/CitizenPortal.Data/CitizenPortal.Data.csproj (in 10.09 min).
It’s weird because in my /home/diego/.nuget/NuGet/NuGet.Config I have:
And if I enter manually to the url I can see perfectly the .json file in the browser (because I’m logged). If I tried in incognite mode, first Microsoft ask me for the login.
I don’t know why is not restoring my nugets.
I’m writting everything here, and I know maybe is not a topic for manjaro but maybe you @linux-aarhus or another user with more experience knows what is happening.
I am thinking that your company has locked down access to the packages hosted on nuget - that will explain why you cannot connect from home - there is an IP address restriction on the repo.
There is a lot of options for criminal entrepreneurs to poison the well - so to speak - and it has been seen - perhaps some kind of security implemented to ensure no-one accidently infect the source code.
thanks to be here and discard options.
No, I don’t think so but obviously I will check it. I don’t think so because the others colleagues continue working OK from home and no one changed anything. And also if i’m not wrong, if i’m blocked I shouldn’t see the JSON https://mypackage.pkgs.visualstudio.com/Utils/_packaging/MyCompany.Utils/nuget/v3/index.json from the browser and I can see it perfectly. For that I don’t understand why is not downloading the packages
Yes, I know. Today is bank holiday here and I’m trying to solve this but I know is off-topic for the forum and I need a little bit the help of my colleagues because they are the experts in infrastructure and backend. I have no idea about .NET
I will try to come with more information or if I got the solution I will post it here like always when I found.
Hi @linux-aarhus here I bring more information, maybe can helps.
Doing dotnet restore --interactive --verbosity detailed I found:
Errors: MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator" because directory "/usr/share/dotnet/sdk/8.0.401/Sdks/Microsoft.NET.SDK.WorkloadAutoImportPropsLocator/Sdk" did not exist.
> Errors: MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.SDK.WorkloadManifestTargetsLocator" because directory "/usr/share/dotnet/sdk/8.0.401/Sdks/Microsoft.NET.SDK.WorkloadManifestTargetsLocator/Sdk" did not exist
If you want to see the log complete, check it here. I cannot post it in the forum because it’s too big.
I found this post in ArchLinux Forum with a user with the same problem but reinstalling everything didn’t solve my problem.
I have deleted everything and reinstalled from the dotnet script from Microsoft with all the version that I need for my projects:
.NET SDK:
Version: 8.0.401
Commit: 811edcc344
Workload version: 8.0.400-manifests.b6724b7a
MSBuild version: 17.11.4+37eb419ad
Runtime Environment:
OS Name: manjaro
OS Version:
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/8.0.401/
.NET workloads installed:
Configured to use loose manifests when installing new manifests.
There are no installed workloads to display.
Host:
Version: 8.0.8
Architecture: x64
Commit: 08338fcaa5
.NET SDKs installed:
3.1.426 [/usr/share/dotnet/sdk]
7.0.120 [/usr/share/dotnet/sdk]
8.0.401 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
DOTNET_ROOT [/usr/share/dotnet]
I’m writting here because maybe you have another idea to continue trying things.
Do you really think I’m writing here without researching on Google, forums and GitHub, looking at and creating issues, suspecting it might be a bug or something? I’m not new to the Internet, and I know how to search. I always come back and write the solution too. This isn’t the first time you’ve thought this about me.
If you don’t want to help people or don’t know the answer, please don’t be rude to those who are just trying to solve a problem. Have you never been a junior at something?
I know this isn’t the specific forum for this topic, but it’s the only place where I can find Manjaro users, and maybe some of them are programmers with the same problem.
I will continue digging and trying to solve the problem, and as always, I will return here and post what the problem was.
I think you are misunderstanding me. I have no intention of being rude or inpolite.
The only relation to Manjaro - is that your host system using Manjaro Linux.
This is not a dotnet forum - right?
Since you have repeatedly stated this is workrelated - I have to ask - don’t you have a mentor you can ask your dotnet questions?
I know you have asked before and you did reply with the solution you dug up - we appreciate that - I believe I made it appear in the tutorials section - must appreciated.
Even given the fact that your collegues is using Windows - you will have to ask them what workflow to use, you need to update your project(s) manually - but I confer with my team before I change something that might break their workflow.
I still have to ask - why are you asking dotnet specific questions in the Manjaro Forum?
I have to advise you to ask your questions in a dotnet forum - preferably a place where members code on both platforms.
Just because you are using Manjaro doesn’t mean you can get support for your work related dotnet issues.
I will sign-off this topic - I have no more comments to your workrelated issues.
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: enp58s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether b0:25:aa:5b:25:74 brd ff:ff:ff:ff:ff:ff
inet 192.168.68.70/22 brd 192.168.71.255 scope global dynamic noprefixroute enp58s0
valid_lft 4510sec preferred_lft 4510sec
inet6 2a02:9003:a7:9eba::33/128 scope global dynamic noprefixroute
valid_lft 36915sec preferred_lft 36915sec
inet6 fe80::eca1:6eb9:d659:953c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: wlo1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether e6:6d:5b:9c:f8:19 brd ff:ff:ff:ff:ff:ff permaddr f4:3b:d8:2a:49:73
altname wlp0s20f3
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:42:76:e4:25 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
And I saw the option 2, explained:
2. Interface enp58s0 (Wired connection):
IPv4: 192.168.68.70/22
IPv6: You have two IPv6 addresses assigned:
Global: 2a02:9003:a7:9eba::33/128
Link-local: fe80::eca1:6eb9:d659:953c/64
And this is the weird part, I said:
“Ok, I’ll try using Wi-Fi and disconnect the Ethernet.” To my surprise, when I did dotnet restore --interactive, everything worked perfectly, and I could run my project again .
After that, I decided to switch back to Ethernet and disconnect the Wi-Fi to see what would happen. To my surprise, everything is still working perfectly, and the commands are running fine. I also tried with another project where I had problems, and yes, it’s still working, and NuGet packages are downloading. It’s like something was “stuck” or something like that…
I have reinstalled maybe 4 or 5 times .NET and different version and the solution was only disconnect and connect… Too weird!
Here you have a solution @linux-aarhus maybe someone pass for the same problem.