views:

508

answers:

1

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 its been jit optimised.

I couple of weeks ago I came across a registry setting that would disable this setting (it specifically mentioned that it aid debugging with the source). However being a wally I've lost what I did with it and am having trouble finding it again.

-- regards, Preet

+3  A: 

I don't know about a registry solution, but you can use an INI file to disable JIT optimazation.

The short version is create an .ini file (i.e. myapp.ini) with the following contents.

[.NET Framework Debugging Control]
GenerateTrackingInfo=1
AllowOptimize=0

Full Explanation Here

JaredPar
What heresy is this - a .NET configuration file that's not XML!!??
Michael Burr
It has to be as its at the win32 level in the CLR I think.
Preet Sangha
@Mike B: I has to be .ini, because at that stage the CLR hasn't begun loading any .Net assemblies so no xml libraries are loaded yet.
Pop Catalin
Thank you. This has helped. Not greatly but enough to shed some more light on our issue,I've raised an issue on "Microsoft Connect" for my original issue if anyone is interested: It appears to me that the remoting reflection has an issue generic methods that have overloads where some of the overloads have 3+ generic parameters.Thanks for your help everyone.preet
Preet Sangha