DotNet Mirror
  DNM facebook   DNM Google+   DNM Twitter   

Failed to convert key to token -- The public key for assembly '(null)' was invalid

By Ashok Nalam on 04 Oct 2013 | Category: .NET Framework | Tagged: error assembly 
  Discuss Add Comment   |  
Add rating Rate this resource   
When we try to retrieve Assembly Public Key token information using SN.exe tool, we might receive an error like "Failed to convert key to token -- The public key for assembly '(null)' was invalid". The tip shows resolution to the error.
Reproduce Error:
Open Visual studio command prompt and run below command
sn.exe -t "D:\Project\Custom.dll"
Press enter key, it throws below error (Failed to convert key to token -- The public key for assembly '(null)' was invalid).
Resolution:
sn.exe arguments are case sensitive(observe above command: t was in small case). so pass below command to get Public key token information
sn.exe -T "D:\Project\Custom.dll"
Output:
Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Public key token is 862052368f18d74f
  Discuss Add Comment    
Add rating Rate this resource   
About the Contributor
Member Since : 10 Dec 2012
Member Points (Level) : 9526  (Professional)
Location : INDIA
Home Page : http://dotnetmirror.com
About : I am admin of this site.
Rate this resource
 
Add your Comment
Name Email WebSite
Captcha Refresh


Comments (0)
No comments found, click here to add comment.
 
cheap jordans|wholesale air max|wholesale jordans|wholesale jewelry|wholesale jerseys