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

时间:2011-10-04 12:23:41

标签: windows visual-studio-2010 azure azure-compute-emulator

我在自动启动Azure Compute Emulator时遇到一些问题 - 当我点击F5时Visual Studio将打包角色,然后说

  

Windows Azure工具:net.pipe:// localhost / dfagent / 2 / host上没有可以接受该消息的端点。这通常是由错误的地址或SOAP操作引起的。有关更多详细信息,请参阅InnerException(如果存在)。

     

Windows Azure工具:Windows Azure计算模拟器未运行或响应。停止调试会话。

我想尝试使用csrun /devfabric:start强制启动模拟器来覆盖(提到here)。

我希望只有在将解决方案部署到Compute Emulator中时才调用csrun,因此将其置于后期构建步骤中将无法执行 - 它将在每次构建时启动,即使我不需要Compute Emulator

我在哪里放置csrun invokation,以便只有在Compute Emulator中部署和运行解决方案时才能完成?

1 个答案:

答案 0 :(得分:0)

在构建后的事件中添加if标志,例如:

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