DCSIMG
Get PublicKeyToken in Visual Studio 2008 - Adlai Maschiach

Adlai Maschiach

" You have to show in order to be seen "

News

Favorite Links

news

CardSpace

Books

Other InfoCards Proj

Virtual Earth

WSS / Sharepoint

SOA , Biztalk & ESB

CLR / .NET

Get PublicKeyToken in Visual Studio 2008

Probelm:

The common way we all get the PublicKeyToken is of the Libarary DLL is to Drag and Drop it to the GAC (c:\windows\assembly) folder , and then right click the DLL.
“So ? Where is the problem ?” , you might ask
Well there are two of them:

  1. if you’re in Vista , you just might come across a “privileges” problem, which means: you are part of the Administrator Group but you still can’t drag and drop to the Assembly, is there a workaround to get the PublicKeyToken ?
  2. If this is “just a step / stage” in the global development , you need to remove the DLL from the GAC , else the project will use the GAC version and not the “development” version – which means you don’t really want it in the GAC , you just need the "Token”

Solution:

In the PostBuild Code add the following

"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe" -T  "$(TargetPath)"

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: