sgrottel / tiny-tools-collection

Assortment of tiny, tiny tools
MIT License
4 stars 0 forks source link

cannot find 2.2.0 of SimpleLog #36

Closed petitchamp closed 4 months ago

petitchamp commented 4 months ago

Hello, I use win11 and VS 2022 When I open project ToggleDisplay , my package manager dispaly an error :

An error occurred while trying to restore package : Unable to find version 2.2.0 of package SGrottel.SimpleLog.Cpp

Do you have any suggestion? Thank you

sgrottel commented 4 months ago

SimpleLog.Cpp in Version 2.2.0 is available online from Nuget.org: https://www.nuget.org/packages/SGrottel.SimpleLog.Cpp

Make sure you have the "NuGet Package Manager" installed in Visual Studio. If you are not sure, open the Visual Studio Installer, select "Modify" of your visual studio. Then switch to the "Individual Components" tab, and enter "nuget" in the search box (upper left). The "NuGet Paackage Manager" should be available under "Code Tools", and should be checked and installed.

Visual Studio should be able to find and install the nuget package. Try right-clicking on the project "ToggleDisplay" in the Solution Explorer in Visual Studio, and open "Manage NuGet Packages..." from the context menu. Go to the "Installed" tab. Make sure the "Package source" drop down in the upper right shows "nuget.org" (or "All"). Then you should be able to restore the nuget package.

Can you please double check that the nuget packet stream from nuget org is not disabled on your system. The drop down in the nuget ui in visual studio would then not show "nuget.org" as possible source.

The workflow action here on github, for example, uses the nuget command line tool:

nuget restore .\ToggleDisplay\ToggleDisplay.sln

You could try this as an alternative to Visual Studio (https://learn.microsoft.com/en-us/nuget/install-nuget-client-tools?tabs=windows)

Let me know if that helps, and if so, what the solution was. I am happy to add the information to the README.md

petitchamp commented 4 months ago

thank your for your detailed explaination. I will try it and come back to close it

petitchamp commented 4 months ago

My VS2022 community does not have pre configured nuget package source. I need to manually add the official source https://api.nuget.org/v3/index.json in Tools->Options->Nuget Package Manager-> Package Sources