clr

Fatal CLR Error 80004005

落爺英雄遲暮 提交于 2019-12-04 23:22:27
Today, everytime I try to open any .Net application I get: CLR error: 80004005 The program will now terminate. Any suggestions? I'd start with downloading and re-installing the .NET framework. I had this problem and uninstalling/reinstalling dot net didn't help. Randomly I found a suggestion to go to c:\Windows\Microsoft.NET\ Then rename the directory called "Assembly" to "Assembly2" or something so you don't erase it but dot net will think it's gone. After doing that, install dot net again. This took hours for me to find and was the ONLY thing that worked. I believe 0x80004005 is (usually) an

What are the benefits of using Scala in .Net?

为君一笑 提交于 2019-12-04 22:51:47
Scala is a peculiar programming language in that it targets both JVM and the CLR. But what are the benefits? Is it worth considering it as a viable alternative to the F# language? Most of the web search hits I see from "Scala .NET" are from 2008 or early 2009. Scala is an interesting language, but my admittedly-ill-informed impression is that is is not a "viable alternative" for an industrial-strength .NET application. I see people talk in passing about writing apps that are portable across CLR and JVM, and it's a nice idea in theory, but in practice I don't see any evidence that anyone has

C# Generics: Constraining T where T : Object doesn't compile; Error: Constraint cannot be special class 'object'

匆匆过客 提交于 2019-12-04 22:35:49
When I constrain T with : Object like this: public interface IDoWork<T> where T : Object { T DoWork(); } I get the error: Constraint cannot be special class 'object' Does that mean there is an implied difference with the following that does compile? public interface IDoWork<T> // where T : Object { T DoWork(); } There is no difference between the two constraints, except for that one is disallowed for being useless to explicitly state. The C# 4.0 language specification (10.1.5 Type parameter constraints) says two things about this: The type must not be object. Because all types derive from

.NET 4.5: internal error in the .NET Runtime (80131506) / disabling concurrent GC

大兔子大兔子 提交于 2019-12-04 22:27:15
I have a long-running .NET 4.5 application that crashes randomly, leaving the message I've mentioned in the question title in the event log. The issue is reproduced on 3 different machines and 2 different systems (2008 R2 and 2012). Application doesn't use any unsafe/unmanaged components, it's pure managed .NET, with the only unmanaged thing being the CLR itself. Here's the stack trace of the crash site that I've extracted from the dump: clr.dll!MethodTable::GetCanonicalMethodTable() clr.dll!SVR::CFinalize::ScanForFinalization() - 0x1a31b bytes clr.dll!SVR::gc_heap::mark_phase() + 0x328 bytes

Calling a SOAP webservice from TSQL stored procedure

☆樱花仙子☆ 提交于 2019-12-04 20:57:16
问题 I am trying to build a stored procedure in TSQL to call a webservice. I've done this before in Oracle, but it seems like it's not so easy in MSSQL. There are of course many reasons not to do this in a stored proc, but since this procedure is only to be used in a daily batch, performance is not too much of a issue. The thing I want to do is as follows: Send a full name to the webservice, the webservice will return a name divided in things like first name, prefix, lastname, etc. The returned

Why does C++ need language modifications to be “managed”?

此生再无相见时 提交于 2019-12-04 20:26:10
问题 Why can't a compiler be written that manages what needs to be managed in C++ code (i.e. to make it "CLR compatible")? Maybe with some compromise, like prohibiting void pointers in some situations etc. But all these extra keywords etc. What's the problem that has to be solved by these additions? I have my thoughts about some aspects and what might be hard to solve, but a good solid explanation would be highly appreciated! 回答1: I'd have to disagree with the answers so far. The main problem to

WPF .exe - large filesize

旧街凉风 提交于 2019-12-04 18:46:07
问题 I am working on a WPF application and the .exe is found to be over 1.2MB in size. I would like to reduce the size of the final executable. The code is no more than a few 200 Kb, I use a few .png images in the project, which alltogether takes up about 20kb. Why is the final executable so big? I used ILDASM statistics to take a look at the .exe statistics. Posting the output below: File size : 1267712 PE header size : 512 (496 used) ( 0.04%) PE additional info : 1547 ( 0.12%) Num.of PE sections

.net clr method table structure

放肆的年华 提交于 2019-12-04 18:28:11
问题 I'm currently reading book titled Pro .NET Performance. One of its chapters contains detailed information about reference types internal structure. Method table is one of the internal fields of reference type layout structure. It is said in this book that method table consists of information about ALL methods of a class. I'm trying to check this theory with a little program class MyClass { public void M() { } } static void Main(string[] args) { MyClass m = new MyClass(); m.M(); Console

Proper Measurement of Characters in Pixels

与世无争的帅哥 提交于 2019-12-04 18:11:33
I'm writing a text box from scratch in order to optimize it for syntax highlighting. However, I need to get the width of characters in pixels, exactly, not the garbage Graphics::MeasureString gives me. I've found a lot of stuff on the web, specifially this , however, none of it seems to work, or does not account for tabs. I need the fastest way to measure the exact dimensions of a character in pixels, and tab spaces. I can't seem to figure this one out... Should mention I'm using C++, CLR/CLI, and GDI+ Here is my measuring function. In another function the RectangleF it returns is drawn to the

Reference an unmanaged C++ DLL from Managed C++

霸气de小男生 提交于 2019-12-04 17:18:03
This question follows from my previous question: Create DLL from unmanaged C++ , but you would not have to read it to understand this new question. I now have a DLL that contains unmanaged C++ code consisting of a few functions, of which I only export one for outside use. Next, I need to use this DLL in a Managed C++ project (built with Common Language Runtime support). So far, I have added a reference to the existing unmanaged project's header file by setting the Additional Include Directories in Visual Studio 2010. If I now try to add a reference to the DLL file: MyManagedProject >