title | description | ms.topic | ms.author | author | ms.date |
---|---|---|---|---|---|
Set up an app for testing on a lab VM |
Learn how to publish an app to an Azure file share for testing from a DevTest Labs virtual machine. |
how-to |
rosemalcolm |
RoseHJM |
03/29/2022 |
This article shows how to set up an application for testing from an Azure DevTest Labs virtual machine (VM). In this example, you use Visual Studio to publish an app to an Azure file share. Then you access the file share from a lab VM for testing.
- An Azure account with an active subscription. Create an account for free.
- A Windows-based DevTest Labs VM to use for testing the app.
- Visual Studio installed on a different workstation.
- A file share created in your lab's Azure Storage Account.
- The file share mounted to your Visual Studio workstation, and to the lab VM you want to use for testing.
First, publish an app from Visual Studio to your Azure file share.
-
Open Visual Studio, and choose Create a new project in the Start window.
:::image type="content" source="./media/test-app-in-azure/launch-visual-studio.png" alt-text="Screenshot of the Visual Studio Start page with Create a new project selected.":::
-
On the Create a new project screen, select Console Application, and then select Next.
:::image type="content" source="./media/test-app-in-azure/select-console-application.png" alt-text="Screenshot of choosing Console Application.":::
-
On the Configure your new project page, keep the defaults and select Next.
-
On the Additional information page, keep the defaults and select Create.
-
In Visual Studio Solution Explorer, right-click your project name, and select Build.
-
When the build succeeds, in Solution Explorer, right-click your project name, and select Publish.
:::image type="content" source="./media/test-app-in-azure/publish-application.png" alt-text="Screenshot of selecting Publish from Solution Explorer.":::
-
On the Publish screen, select Folder, and then select Next.
:::image type="content" source="./media/test-app-in-azure/publish-to-folder.png" alt-text="Screenshot of selecting Folder on the Publish screen.":::
-
For Specific target, select Folder, and then select Next.
-
For the Location option, select Browse, and then select the file share you mounted earlier.
:::image type="content" source="./media/test-app-in-azure/selecting-file-share.png" alt-text="Screenshot of browsing and selecting the file share.":::
-
Select OK, and then select Finish.
-
Select Publish.
:::image type="content" source="./media/test-app-in-azure/final-publish.png" alt-text="Screenshot of selecting Publish.":::
Visual Studio publishes your application to the file share.
-
Connect to your lab test VM.
-
On the lab VM, start up File Explorer, select This PC, and find the file share you mounted earlier.
:::image type="content" source="./media/test-app-in-azure/find-share-on-vm.png" alt-text="Screenshot of the file share in the V M's File Explorer.":::
-
Open the file share, and confirm that you see the app you deployed from Visual Studio.
:::image type="content" source="./media/test-app-in-azure/open-file-share.png" alt-text="Screenshot of contents of file share.":::
You can now test your app on your lab VM.
See the following articles to learn how to use VMs in a lab.