为什么 NGEN 应该挂起并且永远不会完成特定程序集的任何原因?
我有一个使用 Visual Studio 2008 构建的 .NET 3.5 类库项目。
如果我尝试 NGEN 此解决方案文件中的核心程序集,NGEN 永远不会完成,或者至少在我费心让它运行时不会完成(例如过夜)。
还有其他人经历过吗?如果是这样,你解决了吗?如果你这样做了,又是怎样做的呢?您采取了哪些步骤?
如果这是 NGEN 中的错误,我如何将其发布给 Microsoft?我有一个连接帐户,但我应该在哪里发布此特定产品的错误报告,而不是 .NET 类(我知道该去哪里获取)。
可以在此处找到有问题的类库:
- http://svn.vkarlsen.no:81/svn/LVK/LVK_3_5/trunk(subversion 1.6 存储库)
有问题的程序集是 LVK.Core 程序集。
更新:NGEN for .NET 4.0 已完成,但花了近 15 分钟才完成:
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
更新 #2: 在 Microsoft Connect。
I have a class library project for .NET 3.5 built with Visual Studio 2008.
If I try to NGEN the core assembly in this solution file, NGEN never completes, or at least not in the time I've bothered to let it run (like overnight).
Has anyone else experienced this? And if so, did you solve it? And if you did, how? What steps did you take?
If this is a bug in NGEN, how do I post this to Microsoft? I have a connect account, but where do I post a bug-report for this particular product, instead of a .NET class (which I know where to go for.)
The class library in question can be found here:
- http://svn.vkarlsen.no:81/svn/LVK/LVK_3_5/trunk (subversion 1.6 repository)
The problematic assembly is the LVK.Core assembly.
Update: NGEN for .NET 4.0 completed, but it took nearly 15 minutes to do so:
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: Created issue in Microsoft Connect.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
后来发现原因是我对
Tuple<...>
泛型类的实现。事实证明,通过 NGEN 调用时,JIT 进程将为以下类型创建每个
Tuple<...>
类型的 NGEN 版本:由于我有最多 16 个通用参数的元组版本,为了更好地衡量,NGEN 忙于制作
Tuple< 的每个组合。 /code> 适用于所有值类型。
我将类型数量减少到更少的泛型参数,NGEN 现在已完成。
The reason for this was later found to be my implementation of
Tuple<...>
generic classes.It turns out that the JIT process when invoked through NGEN will create NGEN'ed versions of each
Tuple<...>
type for the following types:Since I had Tuple-versions up to 16 generic arguments, just for good measure, NGEN was busy churning out every combination there was for a
Tuple<T1, T2, T3, T4, ..., T16>
for all the value types.I reduced the number of types down to a lot fewer generic arguments, and NGEN now completes.