- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Explain how the assemblies and DLLs work in .NET
Assembly contains all the compiled types in your application along with their Intermediate Language (IL) code. It is also the basic unit of deployment in .NET. In the latest versions of .NET, i.e. .NET Core, an assembly is a file with a .dll extension, which stands for Dynamic Link Library.
There are primarily four items in an assembly.
The compiled IL code for all the types in your application.
Contains the metadata needed by the Common Language Runtime, such as the dependencies and versions that this DLL references.
Its purpose is to describe the assembly to the runtime via the assembly's data, types, and functions. It's added automatically when you compile the source code to build the assembly.
You can use a tool such as ildasm.exe to view the contents of an assembly. Here's some of the data that an assembly manifest contains.
- Name and version number of the assembly
- A list of assemblies that this assembly references
- A list of types defined in the assembly
- Company and the copyright information
- Additional custom data
You can either edit the .csproj file or set the properties on the project in Visual Studio to specify the assembly attributes. You can also specify them in the source code itself, using the AssemblyInfo.cs file.
Contains the metadata for the operating system about deployment and administration. It's added during the build process. The application manifest file is optional. If it is present, it's processed before the runtime loads the assembly.
To add an application manifest to your application, right-click the project in Visual Studio and select Add > New Item > Application Manifest File. When you build the application, it will be embedded into the output assembly.
Contains the resources needed by the application such as images and text.
- How does the event pattern work in .NET?
- How to work with XML and JSON in .NET?
- Explain the stream architecture in .NET
- Explain the iterator pattern in .NET
- Explain the custom value types in .NET
- Explain how reflection works in .NET framework
- Explain how generics work in C#
- Write the difference between Net operating income and net income.
- Explain how Razor Pages work in ASP.NET Core
- Explain Net operating income theory of capital structure.
- Comparison of Java and .NET
- Difference between C# and .Net
- Write the difference between EBITDA and net income.
- Upgrading SAP .NET Connector from .NET 2.0 to .NET 3.0
- What are the differences between .com and .net domains?