我的解决方案是使用Azure模拟器.我想清除Azure存储模拟器Blob,队列和表,而无需执行手动操作.我需要能够从命令行执行此操作,最好是PowerShell.
Visual Studio 2015中的服务器资源管理器,Azure节点:
AzureStorageEmulator.exe帮助返回以下命令:
但是,当尝试"清除"时,将返回以下内容:
已成功清除以下服务的用户数据:无
当我启动开发存储模拟器时,我收到一个错误
The process cannot access the file because it is being used by another process
我想这只发生在BLOB,其他服务,即Queue和Tables启动成功
可能是什么问题呢?我使用的是Azure SDK v1.4

我们在开发计算机和CI服务器上使用Azure存储模拟器,以便能够在本地使用存储队列.现在,每当我退出Windows或重新启动时,我都需要手动启动存储模拟器.
有没有办法将Azure存储模拟器作为服务启动,以便在Windows运行时自动启动?
我在Azure存储模拟器上遇到问题。我试图重新初始化数据库,并收到以下错误。
这是在安装Visual Studio 2019预览版之后,但这可能只是巧合。我尝试了一个小时左右才能使其运行,然后放弃并仅使用“保留我的文件”选项重置我的机器,重新安装了Visual Studio 2017和Azure工具,但仍然遇到相同的问题。
我知道重置听起来有点激烈,但是VS 2019在VS2017中破坏了我的Azure函数,它们无法启动,所以我想要全新安装。
如果我使用sqllocaldb create(版本13.1.4001.0)手动创建数据库,则可以很好地创建数据库,但是初始化仍然失败,并显示相同的消息。
有任何想法吗?
C:\ Program Files(x86)\ Microsoft SDKs \ Azure \ Storage Emulator> AzureStorageEmulator.exe init Windows Azure存储模拟器5.7.0.0命令行工具找到了SQL实例(localdb)\ MSSQLLocalDB。在SQL实例'(localdb)\ MSSQLLocalDB'上创建数据库AzureStorageEmulatorDb57。无法创建数据库'AzureStorageEmulatorDb57':数据库'AzureStorageEmulatorDb57'不存在。提供有效的数据库名称。若要查看可用的数据库,请使用sys.databases。一个或多个初始化操作已失败。解决这些错误,然后尝试再次运行存储模拟器。错误:无法创建数据库'AzureStorageEmulatorDb57':数据库'AzureStorageEmulatorDb57'不存在。提供有效的数据库名称。若要查看可用的数据库,请使用sys.databases。
我想运行使用Azure存储模拟器的单元/集成测试,而不是Azure DevOps构建中的实际存储.
模拟器作为Azure SDK的一部分安装在托管构建控制器上(C:\ Program Files(x86)\ Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe).
但是,模拟器在构建控制器上处于未初始化状态.尝试从命令行运行命令Init时,出现以下错误:
This operation requires an interactive window station
Run Code Online (Sandbox Code Playgroud)
是否有已知的解决方法或计划在Azure DevOps构建中支持模拟器?
我在服务器上使用TFS一个azure应用程序,我发现这个错误,从那以后我无法解决这个问题,
Microsoft Azure Tools: Failed to initialize Microsoft Azure storage emulator. Port conflict with existing application.
Run Code Online (Sandbox Code Playgroud)
任何人都可以帮我提供解决这个问题的步骤.
tfs azure azure-storage azure-storage-blobs azure-storage-emulator
我在Windows Azure中尝试过一些实验室,它运行正常.所以,我开始使用Azure Emulator开发我的应用程序.
我今天在Windows Azure中执行了我的第一个部署测试并且遇到了第一个问题:
No connection could be made because the target machine actively refused it 127.0.0.1:10000
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:10000
Source Error:
An unhandled exception was generated during the execution of the current web request. …Run Code Online (Sandbox Code Playgroud) 在尝试CreateIfNotExists时使用Azure存储模拟器时,我突然收到错误请求(400)错误.对内部异常的响应说:"其中一个HTTP标头的值格式不正确." 所有表都存在,数据在表中,所有内容都在处理,直到我的NuGet包更新.环顾四周似乎是一个常见的原因是Azure存储客户端库(现在5.0.0)的更新导致了不匹配.我将Azure SDK更新为2.6(因为我有VS2012).这使存储仿真器达到4.0.0.0,但仍然没有运气......同样的错误.这是一件坏事,突然对包的一个包的更新导致整个事情破坏并完全杀死我的相当大的项目.有任何想法吗?
我们正在构建一个由Azure存储支持的站点.一个辅助角色有一些文件,它在启动时从blob下载.这些文件一旦存储就永远不会被修改,我们只需将它们拉下来并使用它们.
有时,当尝试从开发存储中下载这些文件时,Storage Emulator服务会返回500个错误.我们可以列出blob中的文件并获取元数据,但不能下载文件本身.我们发现的唯一解决方案是删除blob和重新上载.
有没有其他人遇到这个?
更新:1.7 SDK
通过Nuget,我升级WindowsAzure.Storage到了8.1.1.
然后我下载了AzureStorageEmulator 5.1.0.0客户端.
我的连接字符串:
UseDevelopmentStorage=true;
Run Code Online (Sandbox Code Playgroud)
我之前没有进行任何代码更改,因为它显然工作正常.我知道得到例外:
Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (403) Forbidden. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 677
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 604
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.CreateIfNotExists(BlobContainerPublicAccessType accessType, BlobRequestOptions requestOptions, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlobContainer.cs:line 233
at C3.Code.Controls.Application.Storage.Blob.Blob.GetContainer(String containerName) …Run Code Online (Sandbox Code Playgroud)