Visual Studio 2022 - Getting 'Could not load file or assembly' scenarios for a Project Referencing a NuGet Package
I'm reviewing some code and I'm currently working with an scenario in Visual Studio 2022 where my project throws a 'Could not load file or assembly' behavior for a specific NuGet package. The package in question is `Newtonsoft.Json` version 13.0.1, which I have installed and referenced correctly in my project. However, when I try to run the application, I get the following behavior: ``` Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=13.0.1.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. The system want to find the file specified. ``` I've checked the following: - The NuGet package is installed in the `packages` folder of my solution. - The package is included in the `.csproj` file: ```xml <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> ``` - I've tried cleaning and rebuilding the solution, and also restoring the NuGet packages. - The project is targeting .NET 6.0. Additionally, I'm using a Windows environment, and I have tried running Visual Studio as an administrator, but that didn't resolve the scenario. I also ensured that the `Copy Local` property for the reference is set to `True` in the properties window. This behavior is preventing me from running my application, and I'm at a loss as to what else to try. Any insights or suggestions on how to resolve this would be greatly appreciated! Hoping someone can shed some light on this.