Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determining if an assembly is part of the .NET framework

Tags:

People also ask

How do I know if a file is .NET assembly?

Call the GetMetadataReader method on the PE reader instance to create a metadata reader. Check the value of the IsAssembly property. If the value is true , the file is an assembly.

How do you define assembly in .NET Framework?

An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. Assemblies take the form of executable (.exe) or dynamic link library (. dll) files, and are the building blocks of . NET applications.

Which one is part of .NET assembly?

In . Net, an assembly can be: A collection of various manageable parts containing Types (or Classes) , Resources (Bitmaps/Images/Strings/Files) , Namespaces , Config Files compiled Privately or Publicly ; deployed to a local or Shared (GAC) folder; discover-able by other programs/assemblies and; can be version-ed.

Is assembly in C#?

The . NET framework consists of the concepts of modules, assemblies, which both store metadata and manifest information. An assembly can contain multiple modules. Visual C# only ever creates one module which is turned into an assembly by the C# compiler (csc.exe), but an assembly can link many .


How can I tell from the assembly name, or assembly class (or others like it), whether an assembly is part of the .NET framework (that is, System.windows.Forms)?

So far I've considered the PublicKeyToken, and CodeBase properties, but these are not always the same for the whole framework.

The reason I want this information is to get a list of assemblies that my EXE file is using that need to be on client machines, so I can package the correct files in a setup file without using the Visual Studio setup system. The problem is, I don't want to pick up any .NET framework assemblies, and I want it to be an automatic process that is easy to roll out whenever a major update is finished.

The ultimate solution would be that there is an IsFramework property... :)