I've NuGet package (.Net Standard 2.0) that references Newtonsoft.Json v13.0.1
by PackageReference (What's called the new way). All looks good when packing it. Installing in the VSIX project shows that Newtonsoft
will be downloaded as well and builds successfully. The error happens when VSIX project (.Net Full 4.8) runs and the method that uses Newtonsoft breaks with the message Could not load file or assembly 'Newtonsoft.JSON, Version=13.0.0.0, ...' or one of its dependencies. The system cannot find the file specified.
I've tried different approaches (none of them worked):
- Manually copying
Newtonsoft.Json.dll
to libs folder in downloaded package. - Forcing installing
Newtonsoft.JSON
in the VSIX project.
The NuGet project can be found here and the VSIX project here.
Any ideas?
Update:
I've changed from Newtonsoft
to System.Text.Json
to give a try and the error didn't change.