Questions tagged [clr]

The Common Language Runtime (CLR) is a core component of Microsoft's .NET initiative. It is Microsoft's implementation of the Common Language Infrastructure (CLI) standard, which defines an execution environment for program code. In the CLR, code is expressed in a form of bytecode called the Common Intermediate Language (CIL, previously known as MSIL—Microsoft Intermediate Language).

Developers using the CLR write code in a language such as C# or VB.NET. At compile time, a .NET compiler converts such code into CIL code. At runtime, the CLR's just-in-time compiler converts the CIL code into code native to the operating system. Alternatively, the CIL code can be compiled to native code in a separate step prior to runtime by using the Native Image Generator (NGEN). This speeds up all later runs of the software as the CIL-to-native compilation is no longer necessary.

Although some other implementations of the Common Language Infrastructure run on non-Windows operating systems, Microsoft's .NET Framework implementation runs only on Microsoft Windows operating systems.

Books

Articles

3930 questions
2
votes
0 answers

Does Common Language Runtime execute assemblies?

I understand that C# source code is converted to Common Intermediary Language that is executed by Common Language Runtime. It is just like Java source code that is converted to byte code that is executed by Java Virtual Machine. My question is in…
Prasanjit Rath
  • 166
  • 2
  • 13
2
votes
1 answer

What is mdToken and how does it differ from MethodTable?

As in the title, what is it and how does it differ from MethodTable?
frizik
  • 23
  • 3
2
votes
3 answers

.NET CLR - Object Reference Synchronization

In a multhreaded .NET application, Assume first thread is writing into a List Second thread is clearing all the items in. And third thread is reading from the list. What happens if second and third threads access the same list object at "really"…
Ahmet Altun
  • 3,910
  • 9
  • 39
  • 64
2
votes
1 answer

Is it safe to replace Volatile.Write() with simple assignment in a method that contains only that statement?

This is an advanced question in C# multithreading. Let's say I have this code that is used as a locking mechanism to enable only one thread to start some operation: private static int _guard = 0; private static bool acquire() { return…
mlst
  • 2,688
  • 7
  • 27
  • 57
2
votes
2 answers

creating CLR dumps with breakpad

I am using Google Breakpad to generate crash dumps for my windows application when it crashes. My application mixes C++ native code with C# CLR code. The dumps that breakpad produces don't include any CLR information. Is it possible to turn CLR dump…
Aviad Rozenhek
  • 2,259
  • 3
  • 21
  • 42
2
votes
1 answer

Library to generate .NET XmlDocument from HTML tag soup

I'm looking for a .NET library that can generate a clean Xml tree, ideally System.Xml.XmlDocument, from invalid HTML code. I.E. it should make the kind of best effort guesses, repairs, and substitutions browsers do when confronted with this…
Matthew Flaschen
  • 278,309
  • 50
  • 514
  • 539
2
votes
1 answer

Passing in results of a query to a CLR SqlFunction

I have a stored procedure that needs to pass a result set from another stored procedure into a UDF, that in turn calls a CLR SqlFunction. What I can't figure out how to do is how to pass the result set into my CLR SqlFunction. I don't see a table…
Chris Whisenhunt
  • 351
  • 2
  • 20
2
votes
0 answers

Object instance layout: string literals?

Please, can anyone provide more detail on the figure from the "How the CLR Creates Runtime Objects" article? I'm confused with "string literals" section, I'm not able to find any reason to store those as the part of every object instance and I even…
Sinix
  • 1,306
  • 9
  • 46
2
votes
3 answers

clr threading model information?

I would like to know how System.Threading.Thread works in the CLR. I guess threads in the CLR are "lightweight", meaning they are mapped many-to-one to kernel threads... but who schedules these threads? When I create a thread, does it always create…
Dervin Thunk
  • 19,515
  • 28
  • 127
  • 217
2
votes
2 answers

Is the network load balancer of a web farm affected by GC strain?

Can the resources of one machine in a web farm be affected to such a point by an app running with Garbage Collection Mode = "server mode" such that the network load balancer will adjust for it?
Rikon
  • 2,688
  • 3
  • 22
  • 32
2
votes
2 answers

.NET how to measure how many bytes allocated in a request?

I need to trace objects that are allocated in a request. Is there any tool or command that can help me know how many bytes are allocated and when?
2
votes
1 answer

.NET 4 - Satellite assembly (language resources) DLL loading change in CLR / .NET / ASP.NET 4

Does anybody know if loading of satellite assemblies has changed in .NET/CLR/ASP.NET 4.0? It seems like now the GetString operation on resources is making a call to first check if the assembly is loaded in en-US, en-GB, en-AU, etc, and then loading…
2
votes
0 answers

How the CoreCLR resolves project dependencies?

Lately, I was working on a tool that verifies if a given binary could load the needed dependencies at runtime, for .NET Framework binaries the resolution of dependencies is pretty straightforward as mentioned here. For .NET Core i am still confused…
2
votes
1 answer

Compiler for CLR

I am working towards building a small language or dst that makes use of .net/clr. Aside from reading a lot the most progress I made is a C# program that takes some basic input (no ebnf actual lexing or fancy parsing) and used ILgenerator to create a…
GreatGaja
  • 315
  • 2
  • 11
2
votes
1 answer

Process of getting debug data in a managed environment

I'm trying to figure out where the debugger gets debug information from when working with managed code. What I understood (probably): Firstly. For .NET applications, the lack of debug symbols is not a problem since the components are self-described…
UserName
  • 895
  • 7
  • 17