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