[英]Azure SDK not available on Hosted VS2017 VSTS Build Agent?
Our .Net projects are using VS 2017, and requires Azure Storage Emulator in Azure SDK to run unit tests. 我们的.Net项目正在使用VS 2017,并且需要Azure SDK中的Azure存储模拟器来运行单元测试。 Our CI/CD is running in VSTS.
我们的CI / CD在VSTS中运行。 We want to use some hosted build agent in VSTS agent pools.
我们希望在VSTS代理池中使用某些托管构建代理。 There are two issues we encountered.
我们遇到了两个问题。 Firstly, according to official document, Hosted VS2017 seems don't have Azure SDK installed .
首先,根据官方文档, Hosted VS2017 似乎没有安装Azure SDK 。 Secondly, when running command C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\Storage Emulator\\AzureStorageEmulator.exe start , it failed with Error: Unable to start the storage emulator .
其次,当运行命令C:\\ Program Files(x86)\\ Microsoft SDKs \\ Azure \\ Storage Emulator \\ AzureStorageEmulator.exe启动时 ,它失败并显示错误:无法启动存储模拟器 。
The VSTS Hosted agent is running as service that you can't start storage emulator (init is ok). VSTS托管代理作为服务运行,您无法启动存储模拟器(初始化正常)。
Check the related thread: Failed to start AzureStorageEmulator on VSTS Hosted VS2017 Agent 检查相关线程: 无法在VSTS Hosted VS2017代理上启动AzureStorageEmulator
I've been running the Azure Storage Emulator on a VS2017 hosted build agent for a long time now. 我已经在VS2017托管的构建代理上运行Azure存储模拟器很长一段时间了。
The trick is to initialise SQL LocalDB first (the emulator uses it), and then start the emulator. 诀窍是首先初始化SQL LocalDB(模拟器使用它),然后启动模拟器。 You can do this with a command line task that runs:
您可以使用运行的命令行任务执行此操作:
sqllocaldb create MSSQLLocalDB
sqllocaldb start MSSQLLocalDB
sqllocaldb info MSSQLLocalDB
"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.