Last active
December 27, 2015 18:19
-
-
Save jellebens/7368714 to your computer and use it in GitHub Desktop.
Start Azure Development Blob Storage emulator from code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void StartAzureDevelopmentStorage() { | |
const string processName = "DSServiceLDB.exe"; | |
bool isStorageRunning = Process.GetProcessesByName(processName).Any(); | |
string dir = typeof(BlobRepositoryTests).Assembly.CodeBase; | |
if (isStorageRunning) | |
{ | |
ProcessStartInfo start = new ProcessStartInfo | |
{ | |
Arguments = "/devstore:start", | |
FileName = @"..\..\..\..\..\lib\Emulator\csrun.exe" | |
}; | |
Process proc = new Process | |
{ | |
StartInfo = start | |
}; | |
proc.Start(); | |
proc.WaitForExit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment