【问题标题】:How do I force start Azure Compute Emulator before the role is deployed?如何在部署角色之前强制启动 Azure Compute Emulator?
【发布时间】:2011-10-04 12:23:40
【问题描述】:

我在自动启动 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 调用放在哪里,以便仅当解决方案要在 Compute Emulator 中部署和运行时才执行?

【问题讨论】:

  • 也许添加到调试项目时执行的命令文件? (在 Visual Studio 中,项目属性,然后 Debug / Start Action,选择 Start external program:)
  • @Jeremy McGee:我似乎在云项目和 ASP.NET MVC 角色项目中都没有找到类似的东西。
  • 你说得对,很抱歉 - Azure 项目的项目属性上没有“调试”选项卡。道歉...

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


【解决方案1】:

在您的构建后事件中放置一个 if 标志,例如:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-11
    • 1970-01-01
    • 1970-01-01
    • 2018-05-26
    相关资源
    最近更新 更多