07-23-2023, 08:20 AM
Had a similar problem, In my case, I noticed, that cleaning a solution doesn't clear the bin folder in the visual studio. There was old compiled .dll present in the folder that is causing the issue.
Solutions:
1. Manually delete bin folder and recompile.
2. In case of publishing, select delete existing files prior to publish.
This will solve the issue.
Solutions:
1. Manually delete bin folder and recompile.
2. In case of publishing, select delete existing files prior to publish.
This will solve the issue.