简体   繁体   English

如何在部署角色之前强制启动Azure Compute Emulator?

[英]How do I force start Azure Compute Emulator before the role is deployed?

I have some problems with auto-starting Azure Compute Emulator - when I hit F5 Visual Studio will package the role, then say 我在自动启动Azure Compute Emulator时遇到一些问题-当我按F5键时,Visual Studio会打包角色,然后说

Windows Azure Tools: There was no endpoint listening at net.pipe://localhost/dfagent/2/host that could accept the message. Windows Azure工具:在net.pipe:// localhost / dfagent / 2 / host上没有侦听终结点的端点可以接受该消息。 This is often caused by an incorrect address or SOAP action. 这通常是由不正确的地址或SOAP操作引起的。 See InnerException, if present, for more details. 有关更多详细信息,请参见InnerException(如果存在)。

Windows Azure Tools: The Windows Azure compute emulator is not running or responding. Windows Azure工具:Windows Azure计算模拟器未运行或没有响应。 Stopping the debugging session. 停止调试会话。

which I want t try to override by force-starting the emulator using csrun /devfabric:start (mentioned here ). 我不想尝试通过使用csrun /devfabric:start强制启动仿真器来csrun /devfabric:start (在此处提到)。

I want csrun to be invoked only if the solution will be deployed into Compute Emulator, so putting it into a post-build step won't do - it will start on every build, even if I don't need Compute Emulator. 我希望csrun仅在将解决方案部署到Compute Emulator中时才被调用,因此将其置于构建后步骤中是不会进行的-即使我不需要Compute Emulator,它也会在每个构建中启动。

Where do I put csrun invokation so that it is done only when the solution is to be deployed and run in Compute Emulator? 我应该将csrun调用放在哪里,以便仅在要在Compute Emulator中部署和运行解决方案时才进行?

Put a if flag in your post-build event, for example : 在您的构建后事件中添加if标志,例如:

if $(TargetProfile) == Cloud goto :Cloud
if $(TargetProfile) == Local goto :Local
:Cloud
goto end:
:Local
csrun /devfabric:start
goto end:
:end

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Compute Emulator下启动Azure Web角色时“无端点监听” - “No endpoint listening” when starting an Azure web role under Compute Emulator 如何在Azure Compute Emulator中调用RoleEntryPoint.OnStop()? - How to have RoleEntryPoint.OnStop() called in Azure Compute Emulator? Windows Azure for PHP:计算模拟器错误 - Windows Azure for PHP: Compute emulator error 我如何知道我的 Azure web 角色中是否需要完整的 IIS? - How do I know if I need Full IIS in my Azure web role? 当我的Azure角色移至新VM上时,如何检测情况? - How do I detect the case when my Azure role is moved to on a new VM? 如何命名已部署的应用程序? - How do I name my deployed application? 如何让 Azure web 角色应用程序池从一开始就在正确的用户下启动? - How to have Azure web role application pool start under right user from the beginning? 如何修复此 Azure 错误:web 角色在禁用远程桌面连接后无法启动? - How to fix this Azure bug: web role unable to start after disabling remote desktop connections? 我怎么知道为什么我的 Azure 实例无法启动? - How do I know why my Azure instance doesn't start? 如何强制 Robocopy 覆盖文件? - How do I force Robocopy to overwrite files?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM