I created the netstadard 2.0 class library that references Newtonsoft.Json 12.0.3 nuget. When I build the library and check the referenced assemblies via Assembly.GetReferencedAssemblies() I see that my library references Newtonsoft.Json version 12.0.0 instead of 12.0.3.
Publishing the same library via dotnet publish command copies 12.0.3 version of Newtonsoft.Json as well.
However, if I try to load that netstandard library from .net core 3.1 app dynamically using Assembly.Load() and then use reflection to access type information I get the exception that Newtonsoft.Json version 12.0.0 could not be loaded.
How can I force my class library to reference the 12.0.3 version instead of 12.0.0 which does not even exist on nuget?