clr

Is there anyway to customise how .NET handles floating point exceptions?

微笑、不失礼 提交于 2019-12-08 04:09:08
问题 Apparently the CLR handles floating point exceptions by ignoring the exception and returning a default value. In the case of a floating point overflow for example, the CLR returns +Infinity, but no exception is raised. Delphi on the other hand, by default will raise an exception in the case of an overflow. This is controlled by FPU exception flags, and you can make Delphi do the same thing as the CLR by setting the exception flags accordingly. All well and good. I have a numerical library

.Net CLR Unloading vs shutdown?

孤人 提交于 2019-12-08 02:49:19
问题 What Causes Finalize Methods to Be Called ? 2 answers( of 4 ) to this question are : The CLR is unloading an AppDomain When an AppDomain unloads, the CLR considers nothing in the AppDomain to be a root, and a garbage collection consisting of all generations is performed. The CLR is shutting down The CLR shuts down when a process terminates normally (as opposed to an external shutdown via Task Manager, for example). I assume that The CLR is unloading an AppDomain is when the program (console

CLR detected an invalid program with Entity Framework

柔情痞子 提交于 2019-12-08 02:01:15
问题 I am retrieving data from a wordpress database which defines the primary key as decimal and I am using a x64 configuration on the project... The bit I searched I found out that it is the problem, but I couldn't find a solution. What do I have to do/download to be able to use decimal as a primary key? This issue on Microsoft Connect 回答1: If you're only reading data from the table you can try creating a view that casts the field to an int and then map your entity to the view. Beyond that, I

How big is the risk when testing a .net 3.5 Assembly using a .net 4.0 test assembly

南楼画角 提交于 2019-12-08 01:54:30
问题 I realise that Visual Studio 2010 sp1 allows test projects to target 3.5 now. However, for various reasons I don't fully appreciate, our test projects still target dot net 4.0. The general question is in the title. How big is the risk? Specifically, this presumably means that the tests will run in the CLR v4, whereas many of our clients will be using CLR v2. Also, the tests seem to use v4 of library components (such as System.Data), even though the application is built against v2. One method

How to add reference to a dynamic assembly for compiling another dynamic assembly?

ぐ巨炮叔叔 提交于 2019-12-08 00:37:22
问题 In my AppDomain there are few dynamic assembly, when I try codeDom.CompileAssemblyFromSource to Compile another new assembly, I can't figure out a way to add those dynamic assemble to ReferencedAssemblies. foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) { compilerParameters.ReferencedAssemblies.Add(assembly.Location); } Failed, as dynamic assembly doesn't have Location. Thanks in advance. PS: I'm actually trying to use ASP.Net MVC 3's new Razor template engine in IronPython.

Virtual and Physical Memory / OutOfMemoryException

痴心易碎 提交于 2019-12-07 23:38:47
问题 I am working on a 64-bit .Net Windows Service application that essentially loads up a bunch of data for processing. While performing data volume testing, we were able to overwhelm the process and it threw an OutOfMemoryException (I do not have any performance statistics on the process when it failed.) I have a hard time believing that the process requested a chunk of memory that would have exceeded the allowable address space for the process since its running on a 64-bit machine. I do know

LinQ to SQL and CLR User Defined Types

感情迁移 提交于 2019-12-07 22:27:20
问题 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 to SQL class to use this UDT (with attribute defintions not XML), and I setup the property as the enumeration. I cannot get LinQ to map to this type. I have tried Image, Binary, varchar and integer all of which seem to issue Invalid Cast errors. In

Windows Error Reporting doesn't generate mini dump for a .NET 4 application sometimes

心已入冬 提交于 2019-12-07 19:16:34
问题 I'm trying to diagnose a crash issue for a .NET 4 application. The last time it crashes in a user's machine, Windows Error Reporting doesn't gather the mini dump of the application. I've check the DumpFolder in registry, and I can find the dump files for old crashes, but there's just no new dump file for the last one. The event log of the crash says: Application: MyApp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an internal error int the .NET Runtime at IP

.net Runtime - Silverlight Runtime =?

纵饮孤独 提交于 2019-12-07 17:00:37
问题 I've googled around a bit, and I haven't been able to find a good listing of what classes from the .net CLR are not included in the 'CoreCLR' aka Silverlight. What is Silverlight missing from the Windows .net Framework? Also, is there anything that the Silverlight runtime has that the .net Framework doesn't? 回答1: Silverlight Runtime (Silverlight CLR) is essentially a mini-mini CLR :). Microsoft did the work of removing many dependencies to .NET Framework assemblies not part of the Silverlight

Seemingly random crashes with VB.NET and COM Interop

我只是一个虾纸丫 提交于 2019-12-07 15:53:42
问题 I'm thinking of rewriting a brand new VB.NET application in VB 6. The application runs under terminal services and makes heavy use of COM. For some reason, there is random weirdness with the application - Random Access Violation errors (WinDbg exception analysis points into dll's like comdlg32.dll, mscorwks) Random Buffer Overflow errors (same) Random errors in general - for example this line in Form.Load sometimes throws - Me.Icon = Resources.MyIcon I have followed all possible advice