Fix a bug where custom LinqPad drivers cannot be found on Nexus and Azure DevOps NuGet feeds
Hi,
I have written a custom linqpad driver and published it to our internal NuGet feed.
In the past there were no problems installing this driver.
After updating out Nexus OSS server to the latest version, the driver cannot be found anymore.
I get the same behaviour on our Azure DevOps Feed.
So I did some debugging and found out, that the filtering of the tags is pretty weird across the existing NuGet servers.
When searching for custom drivers, LinqPad creates the following url:
...v3/query/beta?q=tags:linqpaddriver%20&skip=0&take=40&prerelease=false&semVerLevel=2.0.0
The filtering is applied via "tags:linqpaddriver%20"
Here my problems begin...
The nexus server does not find any package (my packages contains one tag "linqpaddriver").
But these filters work:
- "tags:%20linqpaddriver%20"
- "tags:%20linqpaddriver"
Azure DevOps seems not to respond to filtering tags and always returns an emptry response.
But this works:
- "v3/query2?q=linqpaddriver"
NuGet.org accepts all types of queries and whitespaces...
My current workaround is putting my custom driver nuget package on a network share and add this share as a custom feed.
Unfortunately I have no idea what would be the best solution.
Ideas:
- Create a query like %20linqpaddriver%20 -> but this does not work on Azure DevOps
- Create a query like q=linqpaddriver -> maybe you get too much results
- Determine the type of the server and create the best query you can get
Do you have any ideas or other fixes?
I really do not want to go back to the lpx files :D
Best reagards,
Jörg
-
Jörg Metzler commented
Thanks for your quick answer.
q=linqpaddriver would work fine.
DevOps returns valid results:
GET https://xxx.pkgs.visualstudio.com/_packaging/f08aa33d-8508-417a-8014-ea8d6ad2f614/nuget/v3/query2?q=linqpaddriverNexus returns valid results:
GET https://xxx/Nexus/repository/nuget-cluu-release-6-0/v3/query/beta?q=linqpaddriver -
If LINQPad were to omit the "tags:" in the search term, and generate "q=linqpaddriver", or "q=linqpaddriver [searchTerm]" where you've entered a searchTerm, would that work in your use-cases? I could enable this behavior when searching non-official NuGet feeds.