Visual Studio 2022 - implementing NuGet Package Restore in Multi-Project Solution
Does anyone know how to I've been struggling with this for a few days now and could really use some help... I'm working with persistent issues with NuGet package restoration in my multi-project solution using Visual Studio 2022. Every time I build the solution, I get the behavior message: `The NuGet package restore failed. Please see the output window for details.` I've tried to clear the NuGet cache and initiated a manual restore, but the question continues. Here are some specifics of my setup: - I'm using .NET 6.0 for all projects. - The solution consists of three projects: a core library, a web API, and a front-end application. - The core library references several NuGet packages, including `Newtonsoft.Json` and `Moq`, and the web API references the core library. I've ensured that all projects are targeting the same framework version and have the same NuGet source configured. Notably, when I right-click on the solution and select 'Restore NuGet Packages,' it seems to work for the core library, but the API project fails with the behavior: `Unable to find a version of the 'Newtonsoft.Json' package that is compatible with 'net6.0'`. I’ve checked the package versions in the `.csproj` files and they all look correct: ```xml <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>net6.0</TargetFramework> </PropertyGroup> <ItemGroup> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> </ItemGroup> </Project> ``` I also tried deleting the `obj` and `bin` folders, but that didn’t resolve the scenario. Can someone guide to figure out what could be going wrong? I'm exploring and need to resolve this before I can continue development. My development environment is Linux. Thanks in advance!