简体   繁体   English

托管VS2017 VSTS Build Agent上没有Azure SDK?

[英]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.

相关问题 无法在 VSTS 托管的 VS2017 代理上启动 AzureStorageEmulator - Failed to start AzureStorageEmulator on VSTS Hosted VS2017 Agent 如何使用YAML配置文件在VSTS中的VS2017代理中启动Azure存储模拟器 - How to start Azure Storage Emulator in VS2017 agent in VSTS using YAML configuration file 如何在VS2017中而不是在VSTS MSBuild中本地构建Azure预编译的C#函数? - How can an Azure precompiled C# function build locally in VS2017, but not in VSTS MSBuild? Azure和VS2017订阅 - Azure and VS2017 subscription Azure功能无法正常运行VS2017 - Azure Functions Not Working VS2017 在Hosted Linux Agent上运行VSTS构建期间挂载Azure文件存储失败 - Mounting Azure file storage during VSTS build running on Hosted Linux Agent fails 使用VS2017在Azure功能中复制Blob - Copying Blob in Azure Function with VS2017 Azure DevOps(VSTS)-在托管代理上使用Azure Az PowerShell - Azure DevOps (VSTS) - using Azure Az PowerShell on a Hosted Agent VSTS托管代理中的运行空间和作业发布了Azure Powershell脚本 - Runspaces and Jobs in VSTS hosted agent release Azure Powershell script 将 VS2017 Azure DevOps 管道迁移到 VS2019 - Migrate VS2017 Azure DevOps pipeline to VS2019
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM