The short of it is, use the sn -T blah.dll command (see link). Here's the step-by-step for finding the PublicKeyToken of the System.Data.SqlServerCe.dll:
1. Open up the Visual Studio 2005 Command Prompt from the Start Menu. That should set the environment for using VS2005 commands.
2. C:\>cd "C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\"
3. Type "sn -T System.Data.SqlServerCe.dll"
The sn utility will return something like: Public key token is 3be235df1c8d2ad3
Note: if you do not include a capital T (but instead a lowercase, -t), you will receive the following error: "Failed to convert key to token -- The public key for assembly '(null)' was invalid."
Monday, May 22, 2006
Subscribe to:
Post Comments (Atom)
4 comments:
Thanks; I spent a good hour trying to figure this out.
thanks man.
it was 2 days and just a stupid mistake of capital letter...
thanks
Thank you very much!
I spent three hours for searching the stupid mistake.
Thanks a ton!
I spent many hours to debug it as well.
Post a Comment