By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,477 Members | 1,611 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,477 IT Pros & Developers. It's quick & easy.

To GAC or not to GAC?

P: n/a

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.
Oct 25 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
>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

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Oct 25 '07 #2

P: n/a
>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.
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.
Oct 26 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.