I have a .Net 4.6 WebAPI->LogicLayer->Data Accessor application... Data Accessor uses Dapper to get data from database.
I am converting to Core, so started with the WebAPI layer. But right off, I get an error when my Logic layer calls my data access method:
"ClassName": "System.IO.FileNotFoundException", "Message": "Could not load file or assembly 'Dapper.StrongName, Version=184.108.40.206, Culture=neutral, PublicKeyToken=e3e8412083d25dd3'. The system cannot find the file specified.", "Data": null, "InnerException": null, "HelpURL": null, "StackTraceString": " at Data.AuthenticationData.AuthenticateAsync(LoginRequest request)\r\n at Logic.AuthenticationLogic.<AuthenticateAsync>d__3.MoveNext() in C:\\Storage\\VSTS_Repo\\Home Finance\\Logic\\AuthenticationLogic.cs:line 36\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at AuthenticationService.Controllers.AuthController.<LoginAsync>d__0.MoveNext() in C:\\Storage\\VSTS_Repo\\Home Finance\\01.AuthenticationService\\Controllers\\AuthController.cs:line 25", "RemoteStackTraceString": null, "RemoteStackIndex": 0, "ExceptionMethod": null, "HResult": -2147024894, "Source": "Data", "WatsonBuckets": null, "FileNotFound_FileName": "Dapper.StrongName, Version=220.127.116.11, Culture=neutral, PublicKeyToken=e3e8412083d25dd3", "FileNotFound_FusionLog": ""
For some reason, I am getting an error when it tries to connect to my data accessor project (4.6) and this is the error. How can I get this to work, since converting the WebAPI layer to Core?
Note, I spotted a question where the user changed from Dapper to Dapper.StrongNamed and it worked, but that hasn't solved my issue, and I would like to revert back to 'Dapper'. I have no updates. i.e. Packages are up to date. It also sounds like maybe an issue with Core and 'referenced libraries', but ... I'm not sure how to resolve it.
(Adding 'Dapper' via Nuget to the API project fixes the issue, but that doesn't seem like a 'solution')
Converting all projects to Core, and the issue goes away. Seems to be an issue with references and a mix of .Net versions.