tintoy / HTTPlease

HTTP client library using immutable templates with lazily-resolved parameters
https://tintoy.github.io/HTTPlease
MIT License
9 stars 2 forks source link

Can't seems to use the package in 4.7.1 with strong naming issue #7

Open MarcelRoozekrans opened 5 years ago

MarcelRoozekrans commented 5 years ago

Trying to use the package in a 4.7.1 webproject but it complains about the Signing is not properly done.

Could not load file or assembly 'HTTPlease.Core, Version=1.8.3.0, Culture=neutral, PublicKeyToken=c0c32743f5b607c9' 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)

tintoy commented 5 years ago

Hi - sorry, I’m overseas for the next couple of days but I’ll give this a look as soon as I get back!

tintoy commented 5 years ago

Just off the top of my head, which feed did you use to obtain this package?

MarcelRoozekrans commented 5 years ago

NuGet its s dependency of the kubeClient also created by you. Could be issue when signing with old cli version: https://github.com/dotnet/cli/issues/720

tintoy commented 5 years ago

Odd - sorry about that, will look into it as soon as I get get back to a computer !

tintoy commented 5 years ago

Yeah, will try building HTTPlease with the latest SDK to see if that fixes the problem :)

MarcelRoozekrans commented 5 years ago

@tintoy Do you have an update ?

tintoy commented 5 years ago

Hi - I’m flying home tomorrow afternoon. As soon as I get home (where my laptop is), I’ll get onto fixing this. Sorry for the delay, but I’m overseas at the moment and don’t have a computer with me :)

tintoy commented 5 years ago

If you need packages sooner than that, you can fetch the repository, delete global.json, and run build-ci.ps1 which will produce packages using the latest SDK you have.

MarcelRoozekrans commented 5 years ago

For now disabled siging and made own build. I can't get the signing properly working because I lack the private key. Seems that the assmebly is signed with only the public part of the key and signing process.

tintoy commented 5 years ago

That's weird - the strong name key we use is included here in the repository. Can you tell me about the problem you had getting it to build with strong-naming enabled?

I finally got a chance to try downloading the package myself, and every test I've done so far claims that the assembly signature is valid. Could the cached package files for HTTPlease.Core (i.e. in your NuGet cache directoryt) have become corrupt or something along those lines?

I'll zip up and include my demo project so you can try it out if you like.

tintoy commented 5 years ago

Here's the demo project I've been working with. Targets .NET 4.7.1 using the old-style project system, referencing HTTPlease and KubeClient NuGet packages. Can you try building and running it?