-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed as not planned
Closed as not planned
Copy link
Labels
Area-CompilersuntriagedIssues and PRs which have not yet been triaged by a leadIssues and PRs which have not yet been triaged by a lead
Description
I was trying to setup my system to test source generators following the recommended approach (Solution A) in the roslyn cookbook . I have practically copy pasted the code, but I get the following exception when running the test:
NuGet.Protocol.Core.Types.FatalProtocolException : Unable to load the service index for source https://api.nuget.org/v3/index.json.
----> System.IO.FileLoadException : Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I am a little confused by this exception, as the source generator project has no reference to external packages, while the test project uses NewtonSoft.Json version 13.0.1. I also don't have issues with Nuget otherwise.
I have tried also the non-recommended approach (Solution B), and that works fine.
I'm using:
Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.NUnit (1.1.1)
Metadata
Metadata
Assignees
Labels
Area-CompilersuntriagedIssues and PRs which have not yet been triaged by a leadIssues and PRs which have not yet been triaged by a lead