3,954 questions
-1
votes
1
answer
61
views
Publish VS project fails on System.Net.Http 4.2.0.0 not found in SQL Server even though other projects use it
I have several Visual Studio projects (Stored Procedures) that have been published to SQL Server 2014 (yes old I know - legacy software) that use System.Net.Http v4.2.0.0 so I know that the assembly ...
125
votes
7
answers
57k
views
No AppDomains in .NET Core! Why?
Is there a strong reason why Microsoft chose not to support AppDomains in .NET Core?
AppDomains are particularly useful when building long running server apps, where we may want to update the ...
30
votes
5
answers
51k
views
Python: AttributeError: 'module' object has no attribute 'AddReference'?
Am trying to use clr.AddReference and clr.AddReferenceToFile to import an assembly, but python(2.7) keeps making this error:
Traceback (most recent call last):
File "<pyshell#5>", line 1, in ...
16
votes
4
answers
23k
views
LNK2022 metadata operation: Inconsistent layout information in duplicated types
I'm having a new-to-me linker error in a project I'm working with:
1>MSVCMRTD.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in ...
-1
votes
1
answer
64
views
Linking Managed C++/CLR lib to a C++/CLR dll
I was looking through references but could not find the proper solution.
Basically I am planning to have a Managed CLR/C++ DLL (which has winforms, etc). Now to function it it needs to refer to ...
3
votes
2
answers
6k
views
The path for 'ISServerExec.exe' cannot be found when deploying a project
I am working on jobs currently and when I want to deploy my project I am receiving the following error. I tried to check the DTSPath but I wasn't able to find it under the following path "go to ...
2
votes
2
answers
128
views
How to create a working thread inside a dll?
I'd like to write a C++ CLR DLL which creates a thread that does some stuff on his own. The DLL is loaded and maintained by a smoke "classic" C++ win application.
Here is the DLL code:
#...
2
votes
0
answers
93
views
300ms Delay Loading Assemblies on .NET Framework due to Fusion Publisher Policy?
If I create a new WinForms project targeting .NET Framework 4.7.2, and replace Program with the following code
static class Program
{
/// <summary>
/// The main entry point for the ...
3
votes
1
answer
395
views
CLR profiler API: Is ICorProfilerCallback::ExceptionThrown GC safe?
In the .NET framework profiler, is ExceptionThrown guaranteed to not overlap with GC?
Looking at documentation, it appears so:
If the profiler blocks here and garbage collection is attempted, the ...
70
votes
8
answers
38k
views
Is the CLR a virtual machine?
I read a book which referred to the .net CLR as a virtual machine? Can anyone justify this? What is the reason we need the concept of virtual machines on some development platforms?
Isn't it possible ...
19
votes
6
answers
89k
views
Windows service / A new guard page for the stack cannot be created
I have a windows service that does some intensive work every one minute (actually it is starting a new thread each time in which it syncs to different systems over http). The problem is, that after a ...
0
votes
1
answer
314
views
What is the meaning of Referenced Assembly's Version? Why 4.0.0.0?
I have compiled one and the same assembly targeting different Frameworks (4.0 and 4.5).
You can see them in the dotPeek
I have expected that they should reference different Framework libraries (...
0
votes
4
answers
136
views
Does putting less number of curly braces really helps?
What if do not use a curly braces after an if statement. Like :-
if(SomeCondition())
return true;
Instead of
if(SomeCondition())
{
return true;
}
Does it really help the compiler be it in ...
127
votes
5
answers
58k
views
Why Large Object Heap and why do we care?
I have read about Generations and the Large Object Heap, but I still fail to understand what the significance (or benefit) is of having the Large Object Heap?
What could have gone wrong (in terms of ...
24
votes
4
answers
3k
views
To GC.Collect or not?
Reading this old but classic document Writing High-Performance Managed Applications - A Primer, I came across following statment
The GC is self-tuning and will adjust itself according to ...
0
votes
1
answer
871
views
Weird CLR/Compiler behavior in Release Mode but not in Debug Mode
I am developing an application for Windows CE and .NET Compact Framework 3.5.
The code runs fine in Debug mode but when I change the mode to Release I get various exceptions. I think it is related to ...
9
votes
3
answers
8k
views
is there CLR profiler for .NET 4.0 around?
The CLR profiler I downloaded from here link text does not work for my app which is implemented using .NET 4.0. Is there a version for .NET 4.0? Thanks.
0
votes
4
answers
1k
views
What are the compilers available that target JVM or CLR apart from javac or Microsoft's compilers for .Net? [closed]
What are the compilers available that target JVM or CLR apart from javac or Microsoft's compilers for .Net? Why don't we have compilers for popular languages like C, C++ that target JVM or CLR?
0
votes
3
answers
199
views
How can I verify if a function has been cached in C#?
I have created the following functions in C#:
float GetPI()
{
return 22.0f/7.0f;
}
void Calculate()
{
float f1 = GetPI()*4;
float f2 = GetPI()*5;
}
If I create a release build, how will I be ...
0
votes
2
answers
189
views
Can I make the compiler and the CLR ignore non implemented interfaces on my types?
I would like to define a type implementing a certain interface, however I would only implement it in a proxy at runtime. I can see two obstacles in this scenario :
1-Make the compiler ignore non ...
24
votes
1
answer
18k
views
CLR vs Core CLR
I understand that CLR in its current state is bound to the Windows OS and provides various services by using Win32 APIs internally.
Since .NET Core is platform independent, this basically implies the ...
9
votes
2
answers
8k
views
How and when does .NET actually compile code?
Let's say you write an application in C#, VB.NET, anything with .NET.
When you hit build, does it really compile your code? I thought so until I started using Redgate's reflector on some of my ...
1
vote
1
answer
237
views
How to clean restart PythonNet when running Python scripts sequentially in C#?
I am using PythonNet in a C# application to run multiple Python scripts sequentially, each contained in different modules. However, I am encountering inconsistent MemoryAccessViolation errors, which ...
3
votes
6
answers
5k
views
Getting error when compiling debug mode: C++/CLI - error LNK2022
I've got a CLI code wrapping a C++ DLL.
When i try to compile it in debug mode, i get the following error:
Error 22 error LNK2022: metadata operation failed (8013118D) :
Inconsistent layout ...
3
votes
2
answers
6k
views
Validating decimal in C# for storage in SQL Server
I have a decimal database column decimal (26,6).
As far as I can gather this means a precision of 26 and a scale of 6.
I think this means that the number can be a total of 26 digits in length and 6 ...