使用MSBUILD precompileBeforePublish [英] PrecompileBeforePublish using Msbuild

查看:724
本文介绍了使用MSBUILD precompileBeforePublish的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用的Windows Azure 来承载我们对云服务的应用程序,并使用 PowerShell的来构建和使用打包网站的MSBuild

We are using Windows Azure to host our application on a Cloud Service and use Powershell to build and package the website using msbuild.

在释放我们的第一个响应时间是很慢很自然,我们就需要precompile应用程序。

On releasing our first response time is very slow so naturally we'd need to precompile the application.

有大量的文档使用 precompiling的aspnet_compiler ,但是我无法找到使用任何官方文件:

There's plenty of documentation for Precompiling using the aspnet_compiler, however I cannot find any official documentation on using:

msbuild Web.sln /p:PrecompileBeforePublish=true

A <一个href=\"https://www.google.co.uk/#q=site%3Ahttp%3A%2F%2Fmsdn.microsoft.com%2F+$p$pcompileBeforePublish&safe=off\">Google针对MSDN搜索给我什么,而通常的MSDN是相当彻底。所有我能看到的是一个有用的<一个href=\"http://stackoverflow.com/questions/15273551/using-msbuild-how-do-i-build-an-mvc4-solution-from-the-command-line-applying-w\">Stack从今年早些时候发布。

A Google search targeted at MSDN gives me nothing whilst usually MSDN is fairly thorough. All I can see is a useful Stack post from earlier this year.

因此​​,没有人知道 precompileBeforePublish 任何正式的文件?我是不是看错了源?

So does anyone know of any formal documentation for PrecompileBeforePublish? Am I looking at the wrong source?

如果做不到这一点,究竟是什么旗提供给我们,是一样的 precompilation为了部署在一个可更新UI (<一个href=\"http://msdn.microsoft.com/en-us/library/bb398860.aspx#$p$pcompilingForDeploymentWithUpdatableUI\">reference)?

Failing that, what exactly does the flag provide us, is it the same as Precompilation for Deployment with an Updatable UI (reference)?

推荐答案

我想,你的问题是不是pre-编译,我看到,你做了precompiling好。

I think, your problem is not pre-compilation and I see, you have done precompiling well.

我觉得您的项目太大(检查你的最终bin目录的大小)IIS读取每个DLL和调试符号并运行code中的任何行之前到内存中加载它们。

I think your project is too big (Check your final bin directory size) IIS read every dll, and debug symbols and load them in to memory before running any line of code.

如果您的项目规模过大,你的虚拟环境resorces低,磁盘,低内存,低CPU,所以没有神奇吧。

If your project size too big, and your virtual environment resorces are low, magnetic disk, low ram, low cpu, so there is no magic in it.

建议:


  1. 尝试,以减少项目输出的大小。 (删除调试符号
    可以是一个选项)。

  2. 删除所有未使用的参考...(.NET和第三方)的(编辑加)

  3. 扩展您的环境配置。

问候...

这篇关于使用MSBUILD precompileBeforePublish的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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