Any reason NGEN should hang and never end for a particular build?

I have a class library project for .NET 3.5 created using Visual Studio 2008.

If I try to perform an NGEN kernel assembly in this solution file, NGEN will never end, or at least not at the time I was worried that it would start (for example, overnight).

Has anyone else experienced this? And if so, did you decide that? And if so, how? What steps have you taken?

If this is an error in NGEN, how to send a message to Microsoft? I have a connect account, but where I post the error report for this particular product, not the .NET class (which I know where to go.)

The corresponding class library can be found here:

Problem assembly - LVK.Core assembly.

Update : NGEN for .NET 4.0 is complete, but it took almost 15 minutes to do this:

time /t 12:44:39 ngen install lvk.core.dll Microsoft (R) CLR Native Image Generator - Version 4.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved. Installing assembly C:\Dev\VS.NET\LVK\LVK.Core\bin\x86\Debug\lvk.core.dll Compiling assembly C:\Dev\VS.NET\LVK\LVK.Core\bin\x86\Debug\lvk.core.dll (CLR v2.0.50727) ... LVK.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=8dbb1dd9b1276c0a <debug> time /t 12:59:24 

Update # 2: A problem has been created in Microsoft Connect .

+2
source share
1 answer

The reason for this later was the discovery of my implementation of Tuple<...> common classes.

It turns out that the JIT process, when called through NGEN, will create NGEN versions for each type of Tuple<...> for the following types:

  • One common version for all reference types
  • One version for each type of value

Since I had versions of Tuple with up to 16 common arguments, for a good grade, NGEN was busy with the fact that each combination was for Tuple<T1, T2, T3, T4, ..., T16> for all value types.

I have reduced the number of types to a much smaller number of common arguments, and now NGEN is shutting down.

+2
source

Source: https://habr.com/ru/post/913920/


All Articles