dsplaisted / strongnamer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Strongnamer still working without being referenced

desaroger opened this issue · comments

Hi!

We installed the nuget package and it worked perfectly. But later I changed the branch to an old one which does not have the strongnamer reference, I restored the nuget packages, and strongnamer was still signing all the references, causing lot's of problems and we need some hours to found that there was a .targets file in the {project}/obj folder which had references to the nuget folder on my user folder.

I think strongnamer should only work if there is still a reference to himself on the project that is being building, to prevent signing even when the nuget package has been desinstalled (maybe if you manually desinstall the package it actually works nice because it deletes the .targets file, I don't know) or the reference on the csproj has been deleted.

Thank you!

What is the fix? All our projects are not working. We have the same issue. Just delete the .targets files?

EDIT: Deleting all "obj" folders fixed it.

This is a huge issue especially when working with version control. We jumped from a version with strongNamer to one without and nothing was working.

We fixed it deleting the nuget cache from my user folder. For us deleting the obj folder didn't work, the targets had references to this library even after deleting them.

Yes this need to be fixed, this makes any project to stop working if you change your current branch, and debugging this is not easy.

Another issue we see is: Assemblies that are used in both, in a signed assembly (with StrongNamer) and in an unsigned assembly, are no longer copied to the respective bin/** folders. Example:

Assembly A
Assembly B -> Reference to Assembly A
Assembly C (signed) -> Reference to Assembly B
Assembly D (not signed) -> Reference to Assembly B

Assembly C and Assembly D (sometimes?!) do not have the dlls from Assembly A and B inside their bin/** folders. This happens in release and debug mode and of courses crashes all debugging attempts with "missing .dll"-errors.

Deleting all "obj" folders fixes this. But you have to do it all the time over and over again.