aspnet_compiler在Azure中的Starup任务 [英] aspnet_compiler in Azure starup task

查看:141
本文介绍了aspnet_compiler在Azure中的Starup任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如果能够从Azure角色的启动任务调用aspnet_compiler强制precompilation就地。 (如果是的话作为foregroudn /背景或简单的任务?)

Does anyone know if its possible to call aspnet_compiler from an azure role startup task to force a precompilation inplace. (And if so as a foregroudn/background or simple task?)

也许是这样的:
%WINDIR%\\ Microsoft.NET \\ Framework64 \\ v4.0.30319 \\ aspnet_ precompile.exe -v / -pF:\\ siteroot \\ 0

Perhaps something like: %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_precompile.exe -v / -p "F:\siteroot\0"

还是有什么更好的方法来做到这一点?

Or are there any better ways to accomplish this?

推荐答案

是的,这应该工作,一旦你找出编译器在正确的道路,虽然我还没有尝试过这种具体做法。

Yes, that should work once you figure out the right path to the compiler although I haven't tried this specific approach.

我试过另一种方法是使用 ClientBuildManager。precompileApplication描述在这个答案。我打过电话,从里面的OnStart(),但你可以编译C#code作为一个.NET程序集,并使用从PowerShell的或只调用.NET元从PowerShell中的 href=\"http://stackoverflow.com/a/6813572/57428\">和方式,从启动任务调用它。

An alternative I've tried is to use ClientBuildManager.PrecompileApplication as described in this answer. I tried calling that from inside OnStart() but you can compile C# code as a .NET assembly and use that from PowerShell or just call .NET primitives from PowerShell as described here and that way call it from the startup task.

这篇关于aspnet_compiler在Azure中的Starup任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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