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
1 answer

MSSQL Linux Server Issue: SQL Server only supports SAFE assemblies

We recently came across an issue when trying to register some custom SQL CLR assemblies we have created on SQL Server 2017 v14.0.3238.1. First of all, these assemblies require that they have External Access Permission, as they call external APIs. It…
PAlexandrou
  • 41
  • 1
  • 2
2
votes
4 answers

How to use the `dynamic` when specifying generic type arguments in C#?

How to use the dynamic when specifying generic type arguments in C#? I am reading the CLR via C# book. And I come across the following paragraph: It is also possible to use dynamic when specifying generic type arguments to a generic class …
qqqqqqq
  • 1,831
  • 1
  • 18
  • 48
2
votes
0 answers

Import clr gives unresolved symbol

Having installed pythonnet 2.4.0, and mono (dash_apps_36) idf@ubvm:~/Documents/python/PythonWrapper.For.CS$ mono --version Mono JIT compiler version 6.4.0.198 (tarball Tue Sep 24 01:21:28 UTC 2019) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc…
Ivan
  • 7,448
  • 14
  • 69
  • 134
2
votes
1 answer

Does casting reference to class to reference to interface makes any overhead?

When speaking about casting here, I mean implicit cast. Assume class B inherits from A. Because we have only single inheritance in C#, when casting reference to B to reference to A, we don't have to do any ,,this'' pointer adjustment or so. In fact,…
konrad.kruczynski
  • 46,413
  • 6
  • 36
  • 47
2
votes
2 answers

Do you know of a .NET profiler that samples callstack on a timer, generating a map of time spent?

As far as the map goes, think WinDirStat. Only ideally it would show time instead of file size, namespace and class instead of directory, and method instead of file. Here's what I have been reading.
GregC
  • 7,737
  • 2
  • 53
  • 67
2
votes
1 answer

.NET CLR Runtime Method Replacement

I have read quite a bit about the possibilities of overwriting C#/.NET methods at runtime. After looking at some example code, there is one question that I am not able to answer. A very simple PoC for runtime method replacement could look like…
DucatiNerd
  • 467
  • 4
  • 12
2
votes
2 answers

CLR Assembly says it can't find a referenced assembly that already exists in the database

I have a CLR project that references an external assembly. I created the referenced assembly first as follows: CREATE ASSEMBLY [GraphClient] FROM…
Randy Knight
  • 241
  • 5
  • 10
2
votes
1 answer

Play back to the moment of creation of some managed object in WinDbg TTD

Using WinDbg with TTD enabled, how to play back to the moment of creation of some managed object? Lets say I do have its address obtained using !clrstack -a or !dso
Sergei Krivonos
  • 4,217
  • 3
  • 39
  • 54
2
votes
4 answers

Running .NET 4.0 application from .NET 3.5 application

We have 2 desktop host apps written on .NET 3.5 and .NET 4.0. We have 3 add-ins written on .NET 3.5. One add-in is written on .NET 4 - "NET4APP". We want to integrate host apps and add-ins using .NET 3.5 host app for all add-ins. They can be bundled…
Dzmitry Lahoda
  • 939
  • 1
  • 13
  • 34
2
votes
3 answers

Alternatives to MS SQL 2005 FullText Catalog

I can't seem to get acceptable performance from FullText Catalogs. We have situations where we must run 100k+ queries as quickly as possible. Some of the queries use FREETEXT some don't. Here's an example of a query IF EXISTS(select 1 from…
Al W
  • 7,539
  • 1
  • 19
  • 40
2
votes
1 answer

How is return by reference implemented in C#?

Given that C# GC can move memory around, how could ref-return even be implemented? Would the code below cause 'undefined behaviour'? public struct Record { public int Hash; public VeryLargeStruct Data; } public class SomeClass { private…
AbsZero
  • 65
  • 1
  • 6
2
votes
0 answers

Arcadia Cursive REPL setup

I'm following these instructions: https://github.com/arcadia-unity/Arcadia/wiki/Using-IntelliJ-Cursive-with-Arcadia#getting-the-repl-working but starting the REPL appears to stall at the last…
arcanine
  • 1,933
  • 1
  • 15
  • 22
2
votes
0 answers

Is method table allocated in stack or heap?

I was wondering about where the CLR allocates method table. We know that class object references hold on heap and stack points to them. But also, this object's method references allocated in somewhere called 'method table'. As the title implies, I…
Mert
  • 113
  • 1
  • 5
2
votes
2 answers

What makes the CLR show Assertions?

If I define the Debug constant for my C# Project in visual studio I can be sure that assertions will be evaluated and a messagebox is shown when they fail. But what flag, attribute makes the CLR at runtime actually decide whether a an assertion is…
bitbonk
  • 48,890
  • 37
  • 186
  • 278
2
votes
1 answer

Is it possible to use managed pointers to alter a .NET assembly once it has been loaded into memory?

Given that the .NET metadata table format contains actual RVAs that show where an assembly might be located in memory, would it be possible to use managed pointers on the CLR to access the places in memory where the assembly is being stored so that…
plaureano
  • 3,139
  • 6
  • 30
  • 29
1 2 3
99
100