473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How to determine if assembly is a system assembly

Hi,
Any indeas how to programmatically (c#) decide if an assembly is a system
assembly?

Elad
Nov 17 '05 #1
2 2096
Depends on what you mean by system assembly. If you just want to check if it
is in the GAC there is a field in the Assembly object that indicates that.
If you want to know if the assembly was supplied by Microsoft then you can
compare the public key token the assembly is signed with to that used by
Microsoft..you might want to include the ECMA key as well.

You could also compare the name of the assembly to see if it starts with
"System"

None of these are guarantees as these could all change in the future.

"Elad" <El**@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
Hi,
Any indeas how to programmatically (c#) decide if an assembly is a system
assembly?

Elad

Nov 17 '05 #2
I ment the second option. Determining if the assembly was supplied by
Microsoft.
Thanks for your ideas, but I'm looking for a more general way. Something
that I can count on.

Elad

"David Levine" wrote:
Depends on what you mean by system assembly. If you just want to check if it
is in the GAC there is a field in the Assembly object that indicates that.
If you want to know if the assembly was supplied by Microsoft then you can
compare the public key token the assembly is signed with to that used by
Microsoft..you might want to include the ECMA key as well.

You could also compare the name of the assembly to see if it starts with
"System"

None of these are guarantees as these could all change in the future.

"Elad" <El**@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
Hi,
Any indeas how to programmatically (c#) decide if an assembly is a system
assembly?

Elad


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
4
by: Yasutaka Ito | last post by:
Hi, Is there a way to determine which version of .NET Framework any given assembly is built with? thanks! -Yasutaka
3
by: Chris Becker | last post by:
The following code works. My problem is that I don't want to have to hardcode the string that I set resourceName to in the code. Is there a way for me to determine the namespace of the assembly...
1
by: James Wansley | last post by:
I am currently running a c# service that dynamically loads assemblies using System.Reflection.Assembly.LoadFrom("aDll.dll"). These assemblies are stored in an arraylist after they are loaded. I...
2
by: Scott | last post by:
Does anyone know of a way to get the .NET Framework version that's required by a specified assembly. I have a program I've written that creates a Windows Installer setup for any application....
9
by: Alexander Baranovsky | last post by:
Hello friends, How I can determine full path of Microsoft.Basic.dll? Thanks, Alexander
4
by: Object01 | last post by:
We're working with some benchmarks designed to test x86 vs. x64 performance (both on a x64 system). To ensure that our assemblies are loaded as x86 or x64, we specifically target our builds to the...
12
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
I am writing a web app to be widely distributed where I do not know the installed .NET Framework version. I want to take advantage of some .NET 3.0 classes if they are installed, but gracefully...
7
by: Cramer | last post by:
I'm wondering if there is an easy way to programmatically determine if an assembly is installed in the GAC. This would be similar to our ability to easily determine if a file exists...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.