We're building a SDK and really need to "ngen" the SDK assemblies for better performance. And so will some of our customers.
All SDK assemblies are successfully compiled by ngen except one. This particular assembly has a couple of very large methods (IL) due to obfuscation flow control. All dependencies are in same folder - not missing any required assemblies. All test applications and unit tests on these assemblies are good before using ngen (albeit first call to 'large' method is slow due to JIT).
NGEN error and associated event viewer error below.
Any ideas?
Regards, TJ
NGEN Error:
C:\WINDOWS\system32>C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\ngen.exeinstall F:\XXXX\bin\\XXXXSDK.dll
Microsoft (R) CLR Native Image Generator - Version 4.8.3752.0
l
1> Compiling assembly F:\XXXX\bin\XXXXSDK.dll (CLR v4.0.30319) ...
1>Uninstalling assembly F:\XXXX\bin\XXXXSDK.dll because of an error during compilation: The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
Associated Event Viewer Error:
Event Name: RADAR_PRE_LEAK_64
Response: Not available
Cab Id: 0
P1: mscorsvw.exe
P2: 4.8.3752.0
P3: 10.0.18362.2.0.0
P4:
P5:
P6:
P7:
P8:
P9:
P10: