Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Unlisted package version still shows up in visual studio
-
I'm using Proget version 5.3.27 (build 18). When I unlist a package version I can still see the version when managing Nuget packages in visual studio. Using fiddler to view the response from Proget I see that the listed property is set to false.
<d:Listed m:type="Edm.Boolean">false</d:Listed>
Does visual studio not look for this property? I assumed that unlisting a package version would hide the version in visual studio Nuget searches?
-
@nmarkkula_7220 I'm not totally sure, but I'm pretty sure Visual Studio used to pay attention to that flag. Perhaps it's a regression or something in Visual Studio?
But it looks like that's on the v2 API, and Microsoft (and we) aren't really maintaining that anymore. I would try using the v3 endpoint instead.
-
That was just taken from the response of a Visual Studio to Proget request. Is there a way I can force VS to use the v3 endpoint?
Looks like my package source url is
https://MY.FQDN/nuget/MYNUGETFEEDWhich resulted in VS making a GET request to https://MY.FQDN/nuget/MYNUGETFEED/Packages(Id='MYPACKAGEID',Version=''MYPACKAGEVERSION')
-
@nmarkkula_7220 make sure the v3 API is enabled on your feed; the endpoint will look like https://MY.FQDN/nuget/MYNUGETFEED/index.json
visual studios detects the API once it queries it, so if you changet the URL then it should work
-
@atripp
Thanks, I was able to enable the v3 api for my feed. Just in case anyone else stumbles on this the v3 api url was actually https://MY.FQDN/nuget/MYNUGETFEED/v3/index.json. Visual Studio does correctly hide the unlisted versions using the v3 api, thank you.