clr

Books about the CLR

I'm interested in learning more about the .NET CLR internals and how the language is abstracted away. Can anyone recommend a book or two? Thanks. ...

How can a class have no constructor?

Hi, A while back I asked about instantiating a HttpContext object. Now that I have learnt what I didn't know, what confuses me is that you cannot say HttpContext ctx = new HttpContext(); because the object does not have a constructor. But doesn't every class need a constructor? In C#, if you don't provide one, the compiler automaticall...

Localization, MUI and the CLR

I am having some strange behavior when attempting to view my app in a different language. When using a box with a MUI installed (German in this case) and I switch the language to German (the setting is "Language used in menus and dialogs" in the regional and language options) all my forms and controls are translated into pseudo-German (...

What will it take to add Objective-C support to the .NET common language runtime?

Is it possible for the .NET CLR to support Objective-C? Are there any reasons (either from a legal or implementational) standpoint why this wouldn't be possible? In the spirit of cross-platform application development, it would be nice to be able to write and run Objective-c applications on Windows machines. At least i think it would. ...

x64 .NET compilation / Process Explorer oddity

Apologies if any of what I'm about to say makes no sense or overlooks something obvious - my knowledge of CLR internals is spotty. If I understand correctly, then if I just build a solution for 'AnyCPU' in VS2K5 (or point MSBuild at that .sln file with those settings) then the binaries only compile as far as MSIL. They then get JITted t...

Why don’t CLR stored procedures and ADOConnect play nice?

I have an unmanaged C++ application that uses the COM ADOConnection object. The application makes use of the BeginTrans/CommitTrans methods on the object to control transaction behavior. I recently added a CLR stored procedure to do some Regex stuff (and got some wicked fast processing, much better than pulling the data back to C++, pr...

Please help with Fatal CLR Error 80004005

Today, everytime I try to open any .Net application I get: CLR error: 80004005 The program will now terminate. Any suggestions?! ...

How big are various CLR runtimes?

I'm considering migrating a project to managed code, but I've heard that the .NET runtime is huge--several times larger than my executable binary, in fact. That just seems like the tail wagging the dog to me. But I've also been told that some CLR implementations, such as Mono, are modular, and you can create a custom distribution for t...

Embedding .Net Runtime

Am I able to embed the .net runtime so that .net is not required on the host operating system? I was looking at doing this with Mono by looking here: http://mono-project.com/Embedding_Mono but seems to allude to using external modules to accomplish this. My goal is to have one single executable with no installed .net runtime. I do not ...

How to list all running CLR instances

Just forgot the command which I used to execute at DOS Prompt to list all running CLR instances on a Machine. Anyone remembers it?? ...

Running ASP.NET MVC preview 3 apps on a box with the beta installed - how can I remove System.Web.Mvc from the GAC after installing ASP.NET MVC Beta?

I have an app built against MVC Preview 3 (referencing local copies of the MVC assemblies) that I'm trying to modify/test on a machine with the ASP.NET MVC beta installed. I am not interesting in updating this app to run against MVC beta yet - I just need to make a few small changes. It's failing with MissingMethodExceptions on RouteCo...

Switching off the .net JIT compiler optimisations

Hi there. I have a curly one here. When we remote a method (that is using generics) the remoting sink cannot seem to discover our method from the other identical named ones. Debugging with .net source code attached I've got it to where there is a MethodInfo. MakeGenericMethod call. However I cannot look at any of the surrounding data as...

Internals visible to Boo (Binsor)

I am using Castle Windsor for IoC and I want to use Binsor to define my configuration. I want to let my internals be visible to Boo. I have tried to mark my assembly with InternalsVisibleTo("Boo.Lang") but that didn't do the job. I have tried InternalsVisibleTo("Rhino.Commons") because I have noticed that the exception is thrown from wi...

Using mixed DLLs from /clr:pure projects

I'm building a project along with a Dll. The Dll must support native code so I declared it as a /clr. My project was initialy also a /clr project and everything was fine. However I'd like to include some NUnit testing so I had to switch my main project from /clr to /clr:pure. Everything still compiles but any Dll call generates a runti...

What are major differences between C# and Java?

I just want to clarify one thing. This is not a question on which one is better, that part I leave to someone else to discuss. I don't care about it. I've been asked this question on my job interview and I thought it might be useful to learn a bit more. These are the ones I could come up with: Java is "platform independent". Well nowa...

What is the minimum knowledge of CLR a .NET programmer must have to be a good programmer?

When we talk about the .NET world the CLR is what everything we do depends on. What is the minimum knowledge of CLR a .NET programmer must have to be a good programmer? Can you give me one/many you think is/are the most important subjects: GC?, AppDomain?, Threads?, Processes?, Assemblies/Fusion? I will very much appreciate if you post...

C# and CLR features confusion, what feature deserves to be described strictly as C# feature?

I've got to write few words about C#, generally piece of cake? No! I've searched through various internet resources and books and what i got is kind of headache. For example Garbage Collector some sources says that this is C# feature, other that CLR got this feature and C# along with all other .NET languages got it by default. Ofcourse...

Transferring large amounts of XML to a CLR stored procedure

Hi, I'm writing a CLR stored procedure to take XML data in the form of a string, then use the data to execute certain commands etc. The problem that I'm running into is that whenever I try to send XML that is longer than 4000 characters, I get an error, as the XmlDocument object can't load the XML as a lot of the closing tags are missin...

MFC built using /clr compiler option - CString/System::String conversion

I've got a fairly large MFC application that has just been migrated from VS6.0 to VS2008. It was a pretty painful process, but now I'd like to explore any managed-code options that may be available. I was able to successfully build the project using the /clr switch which seems to give me access to managed types. I'd like to know if con...

Does the CLR automatically detect if the garbage collector should be run in server mode?

From a previous question I have seen that the CLR has workstation and server modes for its garbage collector. I know that these can be set from configuration using the gcServer element. If you don't specify this, does the CLR use some magic to decide for you whether the garbage collector should run in server mode? Something based on C...