1

I have an assembly, which I have installed in the GAC. There is another assembly in the project called: MyAssembly.XMLSerializers.dll. I now know what this assembly is after reading here: Why does MSBuild put *.XmlSerializers.dll assembly in the root folder of published web application?.

This assembly is not strongly typed so I cannot add it to the GAC as it stands. Is there a way of strongly typing this assembly in Visual Studio i.e. without manually decompiling it signing it and then compiling it again.

I know how to mark a DLL as signed (by decompiling it and recompiling it). I was wandering if there was a way of visual studio signing the DLL when it generates it.

Community
  • 1
  • 1
w0051977
  • 15,099
  • 32
  • 152
  • 329
  • The Sgen.exe utility uses the /compiler option to pass options to the compiler. You want /keyfile – Hans Passant Jan 23 '15 at 16:52
  • @Hans Passant, can this be done in Visual Studio or does it have to be outside visual studio in a command prompt? – w0051977 Jan 23 '15 at 17:11
  • Sorry for marking it as a duplicate. You're right, it is a slightly different question. I should have just provided a link to the other question in the comments, which I will do now... Here's [a link to another question](http://stackoverflow.com/questions/1220519/how-to-sign-a-net-assembly-dll-file-with-a-strong-name) which provides some interesting related details. – Steven Doggart Jan 23 '15 at 17:18
  • @Steven Doggart, thanks. Surely there is an option in Visual Studio to generate this file with a strong name? – w0051977 Jan 23 '15 at 17:41

0 Answers0