Author Topic: Fixed gacutil error "Attempt to install an assembly without a strong name"  (Read 11603 times)

kathir

  • Administrator
  • Sr. Member
  • *****
  • Posts: 283
Assume that SFTComServer is your COM DLL and SFTComServer_vsnet.dll is created using tlbimp. You might encounter the error message "Failure adding assembly to the cache: Attempt to install an assembly without a s
trong name" in some cases like given below:

C:\kathir\SFTComServer>gacutil -i SFTComServer_vsnet.dll

Microsoft (R) .NET Global Assembly Cache Utility.  Version 2.0.50727.42
Copyright (c) Microsoft Corporation.  All rights reserved.

Failure adding assembly to the cache: Attempt to install an assembly without a s
trong name

To fix this error, you need to use strong name. It can be done is easy two steps like given below:

C:\kathir\SFTComServer>sn -k key.snk  
Microsoft (R) .NET Framework Strong Name Utility  Version 2.0.50727.42
Copyright (c) Microsoft Corporation.  All rights reserved.

Key pair written to key.snk


C:\kathir\SFTComServer>tlbimp SFTComServer.dll /out:SFTComServer_vsnet.dll /namespace:SFTComServer /keyfile:key.
snk

Microsoft (R) .NET Framework Type Library to Assembly Converter 2.0.50727.42
Copyright (C) Microsoft Corporation.  All rights reserved.

Type library imported to C:\kathir\SFTComServer\SFTComServer_vsnet.dll


C:\kathir\SFTComServer>gacutil -i SFTComServer_vsnet.dll
Microsoft (R) .NET Global Assembly Cache Utility.  Version 2.0.50727.42
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly successfully added to the cache


for more details visit us at: http://www.softwareandfinance.com


 


Disclaimer: This web site is for educational and informational purposes only. Click here to read the Disclaimer.
Content copyright 2010-2014. Kathiresan. All rights reserved.
This page is using SMF version 2.0.1