Search code examples
.net.net-assemblygacpfxstrongname

.NET: What needs to be done to let the GAC recognize an assembly as 'new' and accept a new 'strong name'


I have a not yet released assembly where the netAssemblyKeyfile.pfx got lost and I want to develop on a computer where the GAC already was conditioned to only use the strong name of the old keyfile. How can I modify the existing project file or something in a way, so that the GAC would accept the newly created strong name of the new netAssemblyKeyfile.pfx without having to go to the new project wizard and then migrate all source files to the new assembly project?


Solution

  • Somehow I assumed that strong names were registered in the GAC by use of the cryptochip but it seems strong names are there only to be able to update assemblies without admin rights. A simple regasm.exe call with admin privileges re-registered the assembly with a new strong name.