An Azure service that is used to provision Windows and Linux virtual machines.
Stupid mistake... the code to call my method was missing an await.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm working on a console application using the Azure C# SDK (Azure.ResourceManager.Compute version 1.5.0.0) to create a virtual machine.
I have the following objects, both of which are not null:
private readonly ResourceGroupResource _resourceGroup;
var vmCollection = _resourceGroup.GetVirtualMachines();
The problem occurs when I execute the following command:
var response = await vmCollection.CreateOrUpdateAsync(WaitUntil.Completed, name, vmData);
The VM is created successfully, but the console application immediately exits afterward, even though there are additional lines of code to execute. Using Fiddler to monitor the network traffic shows that the result of the call is HTTP/1.1 201.
Has anyone encountered this issue or know how to prevent the console app from terminating after the VM creation?
An Azure service that is used to provision Windows and Linux virtual machines.
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Stupid mistake... the code to call my method was missing an await.