Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

asp.net

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)

like image 462
Iliya Tryapitsin Avatar asked Jul 19 '12 18:07

Iliya Tryapitsin


1 Answers

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" />
like image 50
Nick Tullos Avatar answered Oct 13 '22 18:10

Nick Tullos