NGEN似乎不适用于大型应用程序(使用MEF) [英] NGEN doesn't seem to be working with large application (using MEF)

查看:72
本文介绍了NGEN似乎不适用于大型应用程序(使用MEF)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大型应用程序,具有多达100个类库和一个可执行文件.该应用程序使用大量的MEF进行依赖项注入(不知道这是否会影响NGEN).

I have a large application with upwards of 100 class libraries and one executable. The application uses a lot of MEF for dependency injections (don't know if this affects NGEN).

我已在可执行文件上运行NGEN,该过程似乎已成功完成.我验证了* .ni.dll文件是为我的可执行文件的某些依赖项创建的.但是,当我启动该应用程序时,似乎所有MSIL DLL都已加载 从binaries目录中(我已经使用VS2010调试器中的模块"窗口以及ProcessExplorer sysinternals工具进行了验证).

I have run NGEN on the executable and the process seems to complete successfully. I verified that *.ni.dll files were created for *some* of the dependencies of my executable. When I launch the application, however, it appears that all the MSIL DLLs are loaded from the binaries directory (I've verified using the Modules window in the VS2010 debugger as well as the ProcessExplorer sysinternals tool).

如何解决为什么未加载本机二进制文件的问题?

How can I go about troubleshooting why the native binaries aren't being loaded up?

谢谢!

推荐答案

 

 

Hi,

 

根据MSDN文档,从.NET Framework 4开始,不再可以使用Ngen.exe生成本机映像.加载到以部分信任的方式运行的应用程序中.反而, 即时(JIT)编译器被调用.

According to MSDN document, starting with the .NET Framework 4, the native images that are generated with Ngen.exe can no longer be loaded into applications that are running in partial trust. Instead, the just-in-time (JIT) compiler is invoked.

 

更多详细信息,您可以参考:

Much further information, you can refer to:

 

我希望这可以为您提供帮助.

I hope this can help you.


这篇关于NGEN似乎不适用于大型应用程序(使用MEF)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆