I am adding a nuget package which has dependency of Microsoft.Extensions.Primitives (>= 6.0.0) to a Class Library project (.NETStandard 2.0).
This class library project should be added as reference to my service project which already has reference to Microsoft.Extensions.Primitives (3.1.11)
So while building my solution file with these 2 above projects, the target directory has Microsoft.Extensions.Primitives of version 6.0.0. due to this, getting below error,
System.TypeLoadException: Could not load type 'Microsoft.Extensions.Primitives.InplaceStringBuilder' from assembly 'Microsoft.Extensions.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. at Microsoft.Net.Http.Headers.DateTimeFormatter.ToRfc1123String(DateTimeOffset dateTime, Boolean quoted)
any solution to this issue?
Can I build my class library project to a separate folder and load the dependent assemblies from there? so it won't conflict with service project assemblies?