My goal is to publish and install my .nupkg to a local package source before I push them to our shared package source.
For this I have created a local directory C:\Users\Public\Documents\Dev\_local-nuget-package-source from which I want to install the compiled .nupkg in another project.
I add the .nupkg files as described per Microsoft docs without issues: https://learn.microsoft.com/en-us/nuget/hosting-packages/local-feeds.
However when I try to add the directory as a local source in Visual Studio 2022 > Tools > Options > NuGet Package Manager > Package Sources and try to install a package via the in-built NuGet Package Browser it shows me the following error:

And trying to do it via the Package Manager console or nuget in powershell I get an error like:

I have checked that all the paths are correct. I have made sure my nuspec files and meta data seem in order.
Dis- and re-enable my package source. Clear NuGet Caches. System Restart. Deleting all bin/ and obj/ inside my solution and rebuild. As many related Stack-Overflow and other Forums have suggested.
I am honestly at a loss as to what I am supposed to do to make this work.
So this took me a while to figure out. Apparently the UI of VS-2022 doesn't add the local package source correctly, which is why it fails.
The solution in the end was to go edit the
%AppData%\NuGet\NuGet.configfile and change theprotocolVersion-attribute of my local source to2.After that my package showed up in the NuGet Package Browser, and I was able to install it without issues.
The final package source in NuGet.config would look like this: