clr

Is there a CLR that runs on the CLR ?

I was wondering if there was a .NET-compatible CLR that was implemented using the CLI (common language infrastructure), e.g., using .NET itself, or at least if there were any resources that would help with building one. Basically, something like a .NET program that loads assemblies as MemoryStreams, parses the bytecode, constructs the t...

(.net) How to support implicit type conversion as well as custom equality

Fixed: See notes at bottom I am implementing a generic class that supports two features, implicit type conversion and custom equality operators. Well, it supports IN-equality as well, if it does that. 1) if ( "value" = myInstance ) then ... 2) Dim s As String = myInstance 3) Dim s As String = CType(myInstance,String) The problem I ...

Are static indexers not supported in C#?

I've been trying this a few different ways, but I'm reaching the conclusion that it can't be done. It's a language feature I've enjoyed from other languages in the past. Is it just something I should just write off? ...

Does a Silverlight memory profiler exist?

CLR profiler does not seem to work with the Silverlight CLR. Does another memory profiler exist? ...

ASPX Page Compilation Fails

We’re developing a web-based application that allows administrators to upload plug-ins. All plug-ins are stored in a special folder outside the app root (say, C:\Plugins) and are dynamically loaded via Assembly.LoadFrom(). This works just fine for the most part: WebControls in the plug-ins are instantiated and loaded, custom classes func...

Set server or workstation GC

How can I configure an application, or even an entire machine, to use either the server or workstation flavor of the CLR's garbage collection? ...

How do I obtain a list of the application domains my application has created?

I have a service app that creates AppDomain's during the course of its use for long running tasks. I've been tracking these by storing them in a Hashtable with a unique ID. After a task is completed the service app then unloads the AppDomain allocated to that task and then it's removed it from the appdomain Hashtable. Purely from a san...

Is C++ CLI a superset of C++?

Would a C++ CLI compiler be able to compile some large sets of C++ classes without modifications? Is C++ CLI a superset of C++? ...

SQL Server - Using CLR integration to consume a Web Service

There are a few tutorials on the web that describe consuming a Web Service using SQL Server 2005's CLR integration. For the most, the process seems pretty convoluted. I've run into several issues including the need to change my database's trust level, and using the sgen tool to create a static XmlSerializer assembly; and I still haven't ...

Equivalent of Class Loaders in .NET

Does anyone know if it possible to define the equivalent of a "java custom class loader" in .NET? To give a little background: I am in the process of developing a new programing language that targets the CLR, called "Liberty". One of the features of the language is its ability to define "type constructors", which are methods that are e...

What is the maximum length of a C#/CLI identifier?

Which other restrictions are there on names (beside the obvious uniqueness within a scope)? Where are those defined? ...

Method parameters value through Reflection

I am trying to log a method's parameters by using reflection. I read the earlier question posted about this issue on StackOverflow as well which pointed me to CLR API's. Is it possible, someone can point me to the right direction, as to how will I get the values of parameters passed using API? ...

.NET assemblyBinding configuration ignored in machine.config

I have a situation where I need to be able to load assemblies in the GAC based on their partial names. In order to do this I have added the following to my app.config file: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <qualifyAssembly partialName="MyAssembly" fullName= "MyAssembly, Ver...

Is there an equivalent to Java's "kill -3" for a .NET CLR thread dump?

Hi, Java has the thread dump which is triggered by a signal 3 sent to the process (e.g. "kill -3 PID"). The equivalent I've found for .NET is to use ADPlus (http://support.microsoft.com/kb/286350). This basically attaches a debugger, takes a mini dump, and executes a few commands. I find .NET's approach to be a very brute force, cludgy a...

How do the .NET Framework, CLR and Visual Studio version numbers relate to each other?

With the recent announcement of .NET 4.0 and Visual Studio 2010, it is becoming ever more difficult to keep track of what .NET Framework versions build on what version of the CLR and belong with which version(s) of Visual Studio. Is there a definative table that shows these relationships? ...

File Path/size in C#

How to get the File Directory of a file (C:\myfolder\subfoler\mydoc.pdf). I also want to add the size of the subfolders, and finally the main folder size. This is for a .NET CLR that I need to integrate with SQL Server 2005 for a SSRS report. Thanks. ...

How can I check my .NET assembly for freshness?

All, I'm working on a SharePoint project, but this isn't a SharePoint-specific question per-se. I have an assembly I've deployed to a SharePoint farm, and I'd like to verify whether my "newest version" is sitting in the GAC, or if an older version from late yesterday is sitting there instead. This is a test farm, so yes, we are revving ...

calling managed code from unmanaged code

Hi, I want to call my .NET code from unmanaged C++. My process entrypoint is .NET based, so I don't have to worry about hosting the CLR. I know it can be done using COM wrappers for .NET objects, but I would like to access individual static methods of managed classes, so COM isn't my shortest/easiest route. Thanks! ...

Is there any way to trick the .net JIT compiler into running another method?

Ok, say that my application is emitting (x86) instructions into memory, making the page executable, etc. Is there any way of altering the method stub of an un-JITted method to point to my emitted instruction stream? E.g.: Suppose I have created an x86 instruction stream in memory, which does something arbitrary. Now, further suppose th...

Why CLR integration assemblies have a random version number

For some reason, new projects set the version number of the assembly to 1.0.*, which then assigns what appears to be a random number once compiled. Why is this not set to 1.0.0.0 like all other projects. Thanks. ...