Publish app for testing on an Azure DevTest Labs VM

In this article, you learn how to publish an application for testing on an Azure DevTest Labs virtual machine (VM). As a developer, you may need to validate that your application build runs correctly on another operating system than your developer workstation. You might also distribute an application build for installation and testing by the test team.

This article uses an app from Visual Studio as an example. Visual Studio enables you to deploy an application, service, or component to other computers, devices, servers, or in the cloud. To deploy an application to a lab VM in Azure DevTest Labs, you first publish the application files to an Azure file share. You then access the application on the file share from within the lab VM.

Diagram that shows how to publish an app from Visual Studio to an Azure file share, which is accessed from a lab VM.

Learn more about the deployment options in Visual Studio.

Instead of deploying the application directly from the developer workstation, you might integrate the lab creation and application deployment into your CI/CD pipeline.

Prerequisites

Create an Azure file share

To access the application from your lab VM, you use an Azure file share to store the application files. You publish the application with Visual Studio, and then access the file share in the Lab VM.

Azure DevTest Labs creates an Azure storage account when you create a lab. To create an Azure file share in this storage account:

  1. In the Azure portal, go to the resource group that contains your lab.
  2. Follow these steps to select the storage account linked to your lab.
  3. Follow these steps to create a file share.

Publish your app from Visual Studio

In Visual Studio you can publish your application to other computers, or devices. Publish your application to the Azure file share you created previously.

To publish your app to your Azure file share from Visual Studio:

  1. Open Visual Studio, and choose Create a new project in the Start window.

    Screenshot of the Visual Studio Start page with Create a new project selected.

  2. On the Create a new project screen, select Console Application, and then select Next.

    Screenshot of choosing Console Application.

  3. On the Configure your new project page, keep the defaults and select Next.

  4. On the Additional information page, keep the defaults and select Create.

  5. In Visual Studio Solution Explorer, select and hold your project name, and select Build.

  6. When the build succeeds, in Solution Explorer, select and hold your project name, and select Publish.

    Screenshot of selecting Publish from Solution Explorer.

  7. On the Publish screen, select Folder, and then select Next.

    Screenshot of selecting Folder on the Publish screen.

  8. For Specific target, select Folder, and then select Next.

  9. For the Location option, select Browse, and then select the file share you mounted earlier.

    Screenshot of browsing and selecting the file share.

  10. Select OK, and then select Finish.

  11. Select Publish.

    Screenshot of selecting Publish.

When the publish operation finishes, the application files are available on the Azure file share. You can now mount the file share from another computer, server, or lab VM, to access the application.

Mount the file share to your lab VM

To access the application files in the Azure file share, you need to first mount the share to your lab VM.

Follow these steps to mount the Azure file share to your lab VM.

Access the app on your lab VM

When you connect to your lab VM, you can now access the application files from the mounted file share.

  1. Connect to your lab test VM by using RDP.

  2. On the lab VM, start File Explorer, select This PC, and find the file share you mounted earlier.

    Screenshot of the file share in the VM's File Explorer.

  3. Open the file share, and confirm that you see the app you deployed from Visual Studio.

    Screenshot of contents of file share.

You can now run and test your app on your lab VM.

Next steps

You've published an application directly from Visual Studio on your developer workstation into your lab VM.