472,139 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,139 software developers and data experts.

Determine if assembly is part of framework

Is there any way to determine through code if a given assembly is part of
the .NET Framework? Any special attributes, etc? I saw one suggestion about
checking the key the assembly was signed with, but this appears to differ
between assemblies.

Thanks,

Scott
Nov 20 '05 #1
1 1009
One thing you can do at first is to check whether the assembly is in the
GAC. Assembly.GlobalAssemblyCache will help you to do this. All .Net
framework assemlies are in GAC, while most application assembly won't be
installed into GAC.
However, it won't really resolve your problem, because a user assembly
could be installed into GAC too.

What you can do, is to create a list of names of the assemblies in the .NET
framework, and use this table to match the real assembly name. However,
you will spend some time to generate that list. I think you can get those
names from scanning an install package of the .net framework. It should be
a MSI package, which is actually a small database, where you can find
tables containing what you want.

Thanks
Lifeng
MS VB team

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by Christopher W. Douglas | last post: by
19 posts views Thread by Christopher W. Douglas | last post: by
18 posts views Thread by Christopher W. Douglas | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.