sharptooth
sharptooth

Reputation: 170549

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

Windows Azure Tools: There was no endpoint listening at net.pipe://localhost/dfagent/2/host that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Windows Azure Tools: The Windows Azure compute emulator is not running or responding. Stopping the debugging session.

which I want t try to override by force-starting the emulator using csrun /devfabric:start (mentioned here).

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.

Where do I put csrun invokation so that it is done only when the solution is to be deployed and run in Compute Emulator?

Upvotes: 0

Views: 1770

Answers (1)

Louis Nadeau
Louis Nadeau

Reputation: 33

Put a if flag in your post-build event, for example :

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

Upvotes: 0

Related Questions