To GAC or not to GAC?

  • Thread starter Thread starter Phill W.
  • Start date Start date
P

Phill W.

With Assemblies created with VS'2003 and '2005, is there a quick and
easy way for a.n.other program to determine whether or not the Assembly
is Strongly Named (preferably /before/ trying to feed it into Gacutil?)

TIA,
Phill W.
 
With Assemblies created with VS'2003 and '2005, is there a quick and
easy way for a.n.other program to determine whether or not the Assembly
is Strongly Named (preferably /before/ trying to feed it into Gacutil?)

If you want to do it manually you can use Sn.exe. Programatically you
can call a function like StrongNameTokenFromAssembly in Mscorsn.dll.


Mattias
 
If you want to do it manually you can use Sn.exe. Programatically you
can call a function like StrongNameTokenFromAssembly in Mscorsn.dll.

Excellent!

sn.exe -q -T <assembly>
echo %ERRORLEVEL%

comes back with 0 for anything Strongly Named and 1 for everything else.

Many Thanks,
Phill W.
 
Back
Top