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

LinQ to SQL and CLR User Defined Types

I have created a User Defined Type in .Net 3.5 as per my blog entry at : http://jwsadlerdesign.blogspot.com/2009/04/this-is-how-you-register.html This works fine when using SQL with technologies like nHibernate. However, when I try to map my LinQ…
James
2
votes
1 answer

SQL CLR SqlBulkCopy from DataTable

We have an in memory DataTable in a CLR procedure. After significant processing the DataTable has a lot of data that we need to load into a table in the database. Unfortunately, since we are using a context connection SqlBulkCopy will not work…
ahsteele
  • 26,243
  • 28
  • 134
  • 248
2
votes
0 answers

Decrypting CLR20r3 error in WinForm application

Description : Stopped working Problem signature : Event name: CLR20r3 Problem signature 01: OurApplication.exe Problem signature 02: 3.6.0.1 Problem signature 03: …
2
votes
1 answer

Metro style apps written in JavaScript or C++, do they load the CLR?

If not, then does WinRT have its own Garbage Collector? I ask this because I read this: "There's no need to manage the lifetime of underlying object. Windows releases the object when you're finished with the last of its class instances that you've…
2
votes
1 answer

How can I use the SqlFunctionAttribute in a database project to generate the SQL to deploy the functions myself? Visual studio fails

Background: Visual studio fails at deploying a database project. It tries to drop functions that are already referenced (e.g. in a check constraint), rather than just adding the new ones and updating the existing ones, so the deployment always…
Triynko
  • 18,766
  • 21
  • 107
  • 173
2
votes
0 answers

Hosting CLR: Calling .NET constructors/methods reflectively from C++, when some parameters are Enums

I have a native program that hosts the CLR (i.e. starts it up manually, gets a reference to an AppDomain, etc. - this is not C++/CLI). Within that context, I want to instantiate a FileStream object. To my understanding, the best way of creating…
Smashery
  • 57,848
  • 30
  • 97
  • 128
2
votes
2 answers

How does the Span type wrap around heap-allocated arrays if it's a stack-allocated value type in .NET Core CLR?

How can Span wrap around a heap allocated Array if it is supposed to be a stack allocated value type? Reading through the MSFT documentation on the Span type, I came across the following: When it wraps an array, Span can wrap an entire array, as it…
Flint0fWalrus
  • 25
  • 2
  • 6
2
votes
1 answer

Is there a way to make Visual Studio 2010 to run all tests on the same thread?

Even when Visual Studio 2010 does not run tests in multiple parallel threads, it still uses different threads to run different test methods. It uses one thread to run one test, and then switches to other thread to run other test. It continues…
Dennis
  • 2,615
  • 2
  • 19
  • 20
2
votes
2 answers

Create assembly with permission_set safe

I'm trying to deploy a .NET assembly to SQL Server 2008 R2 database, but I'm just hitting this error: Deploy error SQL01268: .Net SqlClient Data Provider: Msg 6509, Level 16, State 31, Line 1 An error occurred while gathering metadata from assembly…
John Leidegren
  • 59,920
  • 20
  • 131
  • 152
2
votes
1 answer

Unknown function CoUninitializeE shows up during profiling

While using SlimTune to profile a C# application, I find that when profiling native functions is enabled there are lots of entries for a function called "CoUninitializeE." CoUninitialize seems to be related to COM objects, however I'm not directly…
Corey Staten
  • 545
  • 4
  • 12
2
votes
2 answers

In IMetadataImport or MonoCecil, how can I find out out if a method in an internal class is accessible from other assembiles?

One of the cases where a public method of an internal class might be accessible from outside the assembly is if the method implements interface methods or overrides virtual methods that are defined in a public base class. Using IMetadataImport, how…
Omer Raviv
  • 11,409
  • 5
  • 43
  • 82
2
votes
2 answers

Trouble shooting using Pythonnet and setting Runtime.PythonDLL property

I try to use an assembly for .NET framework 4.8 via Pythonnet. I am using version 3.0.1 with Python 3.10. The documentation of Pythonnet is stating: You must set Runtime.PythonDLL property or PYTHONNET_PYDLL environment variable starting with…
JMP
  • 123
  • 6
2
votes
1 answer

Different releases of Microsoft.Build.* assemblies have the same 15.1 version leading to issues

It seems like at some point assemblies Microsoft.Build, Microsoft.Build.Framework, etc. stopped changing their versions after updates, so the versions of actually different Microsoft.Build assemblies became the same (15.1). If an application depends…
2
votes
0 answers

How to access a currently active CLR instead of creating a new one

The problem My goal is to be able to inject and eject a C# DLL into an arbitrary process. The way to go seems to be to inject a C++ DLL that loads and starts the CLR and starts execution of the C# code with…
hanslhansl
  • 63
  • 4
2
votes
2 answers

How to catch event from CLR on C++

I'm running simple dialog on CLR where I fill some textBoxes and press push, So but I need to know when I pressed push. Here is how I run dialog : void CFloBossOPCDlg::OnBnClickedButton3() { NewBoi ^ nb = gcnew NewBoi(); nb->Show(); I…
cnd
  • 32,616
  • 62
  • 183
  • 313