简体   繁体   English

重置 Azure 开发存储

[英]Resetting the Azure Development Storage

In Azure Development Storage's UI, there's a Reset button which stops, wipes, and restarts the devstore.在 Azure 开发存储的 UI 中,有一个重置按钮,用于停止、擦除和重新启动 devstore。 Is there a programmatic way of doing this, similar to how I can stop and start the storage using是否有一种编程方式来执行此操作,类似于我可以使用停止和启动存储的方式

DevStore.Shutdown();

While I haven't reset the devstore programmatically, I suppose you could shell out to DSInit.exe programmatically:虽然我没有以编程方式重置 devstore,但我想您可以以编程方式将 shell 输出到 DSInit.exe:

DSInit /ForceCreate

@david-makogon's response is correct for the version of the SDK used in 2011, however in later versions of Azure Storage Emulator dsinit had been replaced with WAStorageEmulator and then with AzureStorageEmulator . @david-makogon 的响应对于 2011 年使用的 SDK 版本是正确的,但是在 Azure 存储模拟器的更高版本中, dsinit已替换为WAStorageEmulator ,然后是AzureStorageEmulator (Maybe there was something else in between, but it doesn't matter as long as you use the latest SDK at the time of writing of this answer.) (也许两者之间还有其他东西,但只要您在撰写此答案时使用最新的 SDK 就没有关系。)

A good overview of what's used at the moment can be found in Use the Azure Storage Emulator for Development and Testing .可以在使用 Azure 存储仿真器进行开发和测试中找到对目前使用的内容的一个很好的概述。

And regarding your question that would be:关于你的问题,那就是:

  1. Start Azure Storage Emulator to bring up the storage emulator command-line tool.启动Azure Storage Emulator以调出存储模拟器命令行工具。
  2. Run AzureStorageEmulator init /forceCreate运行AzureStorageEmulator init /forceCreate

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM