0
votes

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?

1
Perhaps add to a command file that's executed when you debug the project? (In Visual Studio, project properties, then Debug / Start Action, choose Start external program:)Jeremy McGee
@Jeremy McGee: I don't seem to find anything like that neither in cloud project nor in the ASP.NET MVC role project.sharptooth
You're right, apologies - there's no "Debug" tab on project properties for an Azure project. Apologies...Jeremy McGee

1 Answers

0
votes

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