To GAC or not to GAC?

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.
 
M

Mattias Sjögren

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
 
P

Phill W.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top