一、NGen优化
%WINDIR%Microsoft.NETFramework64v4.0.30319 gen install EntityFramework.Core.dll %WINDIR%Microsoft.NETFramework64v4.0.30319 gen install EntityFramework.MicrosoftSqlServer.dll
注:
For 32 bit run:
%WINDIR%Microsoft.NETFrameworkv4.0.30319
gen install <Assembly name>
For 64 bit run:
%WINDIR%Microsoft.NETFramework64v4.0.30319
gen install <Assembly name>
注意:
在Windows Server 2012上要这样写:
%WINDIR%Microsoft.NETFramework64v4.0.30319>.
gen install ***.dll
即ngen前面要加.
重启一下应用程序池和IIS!
二、预编译发布
去掉“允许更新预编译站点”前的勾