✅ DevOps .net core publish error
I'm using a DevOps setup with nugets pushed to artifacts, this works fine for the older projects
But when I try and build this new project I get a "error NU1301: unable to load the service index for source https://api.nuget.org/v3/index.json
I have permissions to the artifacts so it's not that.
Thanks in advance
74 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I mistyped
If that's what you mean
Typing on a phone since I don't have discord on my work-laptop
Yes
If only that was the issue but no
I just couldn't copy paste the error message
Oh for crying out loud
It might just be me that's an idiot and there is a package or two that still tries to connect to nuget.org instead of the local artifacts
Fuck me it's Monday
Is there any good way to check for which packages might be missing?
I've tried removing reference to nuget.org in my project and tried to update-packages, reinstalling and all that but I get no errors locally
You can clear the cache with https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-locals
dotnet nuget locals command - .NET CLI
The dotnet nuget locals command clears or lists local NuGet resources such as http-request cache, temporary cache, or machine-wide global packages folder.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Reason I did that is because the server doesn't have access to nuget.org
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I don't know it's just how work has it set up, security reasons I think
I'm supposed to upload the nugets to artifacts and get them from there
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I have no idea what half you're saying means
I'm by no means experienced in pipelines or yaml
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yes
It's in the title of my question
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Shit sorry
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
As I said I'm a newbie at this
I can do the coding part of a project fine but not this sort of stuff
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
So adding the artifact feed would be the same line as the nuget.org but with my irl in instead?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I'm just not clear on where you want me to add it
Or how
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I have the nuget.config open
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Erh I'm on my phone
It just lists the nuget.org after a <clear/>
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Just copy the URL from the artifacts page?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yeah I'm on that page
Hah
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yeah that makes sense
I'll try that
Thanks btw for for helping and being patient
I'm not the best webdev
Yeah that's giving me 401 unauthorized
Which doesn't really make sense
How can it not access itself
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
From ci
Ran the pipeline
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
By infrastructure you mean server, right?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I'm pretty sure all of our Azure DevOps stuff is on the same machine
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I'll try and have a look
Thanks again
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
HM apparently already have this
VstsFeed is companyName/FeedName
Hmm this happens when the publish command is ran
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
It works for the other older projects
The main difference is this one is running .net6
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yeah I don't know
Most of this was set up before I started at this company
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Could it be the credentials
And the links it says ir can't reach work fine when I click on them
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Hm
Apparently the rest of our pipelines are having issues
The only new thing I can think off is that the .net SDK 6 was added to the servers
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
An integration service is suddenly missing Microsoft.NETCore.App.Host.win-64
It worked fine last time it was run and has not had an update since,
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Main project is having issues with a branch check which it didn't have a week ago
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ah so the integration one is because I updated to a new sdk
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Tell that to my boss or whoever decided that
Yeah I don't think that's an option
I am not even allowed to save my XD files in a cloud
This has become such a rabbit hole
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yeah that's fair
You helped more than I expected
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
¯\_(ツ)_/¯
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I'm just a stupid junior Dev, only been here a year
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
We are four Devs
I didn't really have a choice
Besides all I had to do was set up a pipeline for this new api
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
tebeco#0205
and given what i'm reading i'd ask to be paid to help if that shit is real
Quoted by
<@!689473681302224947> from #DevOps .net core publish error (click here)
React with ❌ to remove this embed.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Department but yeah probably
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Company 500-600
My team? 14
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Not German
But yeah sensitive data
SSN and so on
But in EU yes
I'm definitely going to try and suggest getting the feed to just copy nuget.org dsily
Day 2:
Renamed the packages folder in my local .nuget.folder
Removed nuget.org from VS nugetmanager
Built the project
Got nine errors
Unable to find X
Look up Artifacts in Azure DevOps, sure enough those exact nine nuget packages have been uploaded before but have all been deleted 2.5 years ago
Nvm
Think I finally fixed it, everything builds now and I could deploy to Demo
API still isnt working but I think thats a database not haven been updated issue not a build one
so I fixed it by adding a --no restore to the publish command
Figure we already have a restore command so why does it need to try and restore in the publish command as well, and who would have thunk, it worked