Failed to start AzureStorageEmulator on VSTS Hosted VS2017 Agent - azure

We have .Net project build definition on VSTS and it's using Azure Storage Emulator for running tests. And we want to use Hosted 2017 agents for the build definition.
I saw this question (Azure SDK not available on Hosted VS2017 VSTS Build Agent) and the comment that I can use command "C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe init /server (localdb)\MSSQLLocalDb" to initialize Azure Storage Emulator.
However, when I tried to start Azure Storage Emulator with command "C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe start", it failed with Error: Unable to start the storage emulator.
Is there any way to start Azure Storage Emulator on VSTS Hosted 2017 agent?
Command and Error

It is now possible.
See the other answer:
https://stackoverflow.com/a/51726177/1830814
Some more info here:
https://developercommunity.visualstudio.com/content/problem/238481/hosted-visual-studio-2017-errorno-available-sql-in.html#

The VSTS Hosted agent is running as service that you can’t start storage emulator (init is ok).
A related thread: VSO Hosted Build Controller - Is the Azure Storage Emulator supported?
Update:
Based on the test, the Azure Storage Emulator can be started on Hosted VS2017 agent now.

Related

Cloud Explorer Equivalent Debug VS2022 for zipped published code uploaded to storage?

Cloud explorer in VS2022 has been removed. I publish & zip the code and upload it to Azure in a private azure storage account that then runs Function Apps (running from a package file). How can I debug remotely like I used to do with clould explorer?
Publish does not offer the Hosting option. so the Stackoverflow answers don't work for me. Also I have connected the Function App to Connected Services and I click on Attach debuger but it does not stop the code when executed, i.e. step-in code to debug doesn't work like Cloud Explorer did.
After deployment checks some settings.
Check Remote debugging is ON on azure portal and Select the Remote Visual Studio version, if not selected.
Go to visual studio and go-to tool and select get tool and features. You just need to take Azure development. after this Storage Emulator is automatically installed if not installed go to the Microsoft site and install this.
If installed you can run it by using this command. AzureStorageEmulator.exe start. More information about Azure Storage Emulator for Development and testing by Microsoft Document on
Change Configuration from Release to Debug.
Start Azure Storage Emulator below cmds. if not installed in your system click here to Download from the Microsoft site.
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe
Windows Azure Storage Emulator 5.10.0.0 command line tool
Error: Expected command as first argument.
Usage:
AzureStorageEmulator.exe init : Initialize the emulator database and configuration.
AzureStorageEmulator.exe start : Start the emulator.
AzureStorageEmulator.exe stop : Stop the emulator.
AzureStorageEmulator.exe status : Get current emulator status.
AzureStorageEmulator.exe clear : Delete all data in the emulator.
AzureStorageEmulator.exe help [command] : Show general or command-specific help.
See the following URL for more command line help: http://go.microsoft.com/fwlink/?LinkId=392235
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe start
Windows Azure Storage Emulator 5.10.0.0 command line tool
Autodetect requested. Autodetecting SQL Instance to use.
Looking for a LocalDB Installation.
Probing SQL Instance: '(localdb)\MSSQLLocalDB'.
Found a LocalDB Installation.
Probing SQL Instance: '(localdb)\MSSQLLocalDB'.
Found SQL Instance (localdb)\MSSQLLocalDB.
Creating database AzureStorageEmulatorDb510 on SQL instance '(localdb)\MSSQLLocalDB'.
Granting database access to user FAREAST\v-pusharma.
Database access for user FAREAST\v-pusharma was granted.
Initialization successful. The storage emulator is now ready for use.
Error: Unable to start the storage emulator.
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>netstat -p tcp -ano | findstr :10000
TCP 127.0.0.1:10000 0.0.0.0:0 LISTENING 9764
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>taskkill /F /PID 9764
SUCCESS: The process with PID 9764 has been terminated.
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe start
Windows Azure Storage Emulator 5.10.0.0 command line tool
The storage emulator was successfully started.
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>
Check whether Storage Emulator show is connected or not.
Then add break point on visiual studio and run function . it's working,
Using this option to attach debug remotely. because in visual studio 2022 not show Cloud Explorer.

Azure App Service installed to C:\home\site\wwwroot - New Relic error

In Azure DevOps (dev.azure.com) we publish our asp.net application to an Azure App Service.
In the Console of Azure, it says that the site is; C:\home\site\wwwroot
When we try and install the New Relic Azure Site Extension it fails because it expects the site to be in D:\ so doesn't install the NewRelic folder in wwwroot
Why would Azure install the application into C: and not D: ?
Note: We run the site from a package: WEBSITE_RUN_FROM_PACKAGE = 1
Here's KUDU, it thinks the site is in C: too:

jenkins job unable to read Service fabric registry Keys

I am trying to setup jenkins job to create service fabric cluster locally using powershell script DevClusterSetup.ps1[By default available in setup directory] file. The script is working perfectly when runnin through local powershell. Biut when i am runnins same script it is unable to read registry keys of service fabric. When i am trying with other registry keys its working. only with service fabric reg keys its not working.
Get-ItemProperty : Cannot find path 'HKLM:\Software\Microsoft\Service Fabric SDK' because it does not exist.
At C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1:61 char:20
Where as service fabric sdk is already installed in my system.

Unable to install the VSTS Agent Azure VM extension

I am unable to install the VSTS Agent Azure VM extension on an Azure VM. I tried both the Install extension blade in the Azure portal and the Powershell option. When I try from the portal it just gets stuck at transitioning. If I run the Powershell script it gets stuck trying to connect to server.
I was able to install it on another server without any issues. The 2 servers are part of a web farm so they are exact images.
I am following the steps detailed at this url https://learn.microsoft.com/en-us/vsts/build-release/concepts/definitions/release/deployment-groups/howto-provision-deployment-group-agents?view=vsts .
I am trying to deploy from VSTS to an Azure VM.
This is the screen when I try to run the powershell script.
Run the config file directly (from C:/vstsagent folder) in cmdline and try again with dev.azure.com/{organisation name} url.

AZCopy development to production

I can copy from production to development just fine, but when I try to copy from development to production I get this error:
404, resource not found.
For the command:
AzCopy /Dest:https://accountname.blob.core.windows.net/appimage /Source:http://127.0.0.1:10000/devstoreaccount1/appimage /DestKey:key /SourceType:blob /SourceKey:Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw== /S
I have tried both storage emulator 5.0 and the latest 5.3 and different AZ copies. All my containers are public access.
This error just doesn't make any sense.
It is not supported to transfer from storage emulator to cloud directly. See this issue.
You can add /SyncCopy parameter to your command.
It automatically downloads blobs from emulator to local memory and then uploads them to cloud.

Resources