这是我的WiX配置:
<!--EntityFramework.dll-->
<Component Id="cmp_EntityFramework.dll" Guid="DAABA923-D36B-4F95-B25A-D48671D0E5CE">
<File Id="fil_EntityFramework.dll" KeyPath="yes" Vital="yes" Source="$(var.SvcBinDir)\EntityFramework.dll">
<netfx:NativeImage Id="ngen_EntityFramework.dll" Platform="64bit" Priority="0" AppBaseDirectory="INSTALLFOLDER"/>
</File>
</Component>
<!--EntityFramework.SqlServer.dll-->
<Component Id="cmp_EntityFramework.SqlServer.dll" Guid="CBBA1C50-B51D-4ECD-878B-FCAE42CAE65A">
<File Id="fil_EntityFramework.SqlServer.dll" KeyPath="yes" Vital="yes" Source="$(var.SvcBinDir)\EntityFramework.SqlServer.dll">
<netfx:NativeImage Id="ngen_EntityFramework.SqlServer.dll" Platform="64bit" Priority="0" AppBaseDirectory="INSTALLFOLDER"/>
</File>
</Component>
我必须修改“ Platform”属性以针对64Bit执行此操作。所有编译并运行正常。但是,我看不到库是ngen'd
这是我第一次安装前的输出:
C:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319> ngen显示 EntityFramework Microsoft(R)CLR本机图像生成器-版本 4.7.3056.0版权所有(c)Microsoft Corporation。保留所有权利。
NGEN根:
C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ EntityFramework.dll
取决于“ EntityFramework”的NGEN根:
C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ EntityFramework.dll C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ EntityFramework.SqlServer.dll C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ EntityFramework.SqlServerCompact.dll
本机图像:
EntityFramework,版本= 6.0.0.0,文化=中性, PublicKeyToken = b77a5c561934e089
这是我运行程序包后看到的内容:
C:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319> ngen显示 EntityFramework Microsoft(R)CLR本机图像生成器-版本 4.7.3056.0版权所有(c)Microsoft Corporation。版权所有。错误:未安装指定的程序集。
我想它可以清理缓存了吗?但是,那没有安装任何东西吗? 问题2为什么要删除现有的? 问题3。如果我在多个地方使用EF.dll,我应该每个都使用gen。吗?还是只有一个可以?
我查看了NGen日志,好像它在安装/卸载时所做的一切都正确,但是使用“ ngen display”却看不到任何东西