Could not load file or assembly: The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key

9

I use in my project ASP.NET assemblies building from source code. My project builded successful. But when I start in debug mode, I get exception

Could not load file or assembly 'System.Net.Http.Formatting' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)

c#
asp.net

3 Answers

2

I was able to get around this issue for my odata dll by removing the following line of code from the project file of the asp web stack odata project.

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory),Runtime.sln))\tools\WebStack.settings.targets" />
answered on Stack Overflow Oct 2, 2012 by Nick Tullos
0

Try and remove the dll from the bin folder and rebuild your solution. I don't know why but this solved it for me.

answered on Stack Overflow Jul 7, 2015 by FrankyHollywood • edited Jul 8, 2015 by FrankyHollywood
0

Deleting files from Bin and Obj/Debug folder, fixed my problem.

answered on Stack Overflow May 17, 2017 by Parveen

User contributions licensed under CC BY-SA 3.0