I have a simple file in the root of my Web project (which is tied to a Web worker role). The file is named Startup.cmd
. This file contains the following line: dir > directory.txt
. It executes properly when I run it from the command line and outputs a list of the directory contents to file named directory.txt
as you would expect. Similarly, the line ECHO Write this line to file > output.txt
does not appear to work either.
Inside ServiceDefinition.csdef
for my Azure Cloud Service project, I have the following lines:
<WebRole name="Website" vmsize="Small">
<Startup>
<Task commandLine="Startup.cmd" executionContext="elevated" taskType="simple"></Task>
</Startup>
....
</WebRole>
I believe it is finding the file, because I have tried changing the path and it will throw a build error that it cannot find it. The issue is that when I check my /bin/
directory after debugging to the Azure Debugging Environment, I see Startup.cmd
(I have it set to Copy always
) but I do not see directory.txt
. I'm not sure of another way to confirm that it executed properly.