[BUG] Deployment Outputs object is not set on deployments created with Fluent API.
See original GitHub issueDescription Deployment Outputs object is not set on deployments created with Fluent API.
To Reproduce Steps to reproduce the behavior:
- Create an ARM template producing some basic outputs, e.g.
{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "resources": [], "outputs": { "result": { "type": "string", "value": "Ok" } } }
- Initialize an azure object of the Microsoft.Azure.Management.Fluent.IAzure type, as described in https://docs.microsoft.com/en-us/azure/virtual-machines/windows/csharp-template
- Deploy the above template (templateJson- parameter) to an existing resource group ( resourceGroup parameter) with
var deployment = azure.Deployments.Define($"myDeployment") .WithExistingResourceGroup(resourceGroup) .WithTemplate(templateJson) .WithParameters("{}") .WithMode(Microsoft.Azure.Management.ResourceManager.Fluent.Models.DeploymentMode.Incremental).Create(); Debug.Assert(deployment.Outputs != null);
Code Snippet Debug.Assert(deployment.Outputs != null);
Expected behavior The Debug.Assert(deployment.Outputs != null) assertion should pass.
Setup:
- OS: Windows
- IDE : Visual Studio
- Microsoft.Azure.Management.Fluent 1.26.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (8 by maintainers)
Top Results From Across the Web
Azure API deployment issue - Swashbuckle SwaggenGen ...
I have created a sample ASP.NET Core 6.0 Web API and able to deploy the Application to Azure App Service without any errors....
Read more >Troubleshoot common Azure deployment errors
Error code Mitigation More inform...
AccountNameInvalid Follow naming guidelines for storage accounts. Resolve erro...
AccountPropertyCannotBeSet Check available storage account properties. storageAcco...
AnotherOperationInProgress Wait for concurrent operation...
Read more >Suite deployment failed with pods in pending state
The suite deployment failed with pods in pending state. Cause. This issue may be because of insufficient memory in the pod.
Read more >File not found in deployment directory - ITOM Practitioner Portal
Cause. This error occurs when the NA server crashes or the mf-nom-na.ear.dodeploy file is deleted accidentally. Solution.
Read more >Object reference not set to an instance of an ...
If I start the debug session in the Enterprise edition it deploys and runs fine, and I then deploy with the 15.8 version...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yungezz @weidongxu-microsoft
If you want to build specifically for net5.0, you can add
net5.0
to csproj file.(however it might have unforeseeable issue).
I assume net5.0 would be backward compatible, so if you project target is net5.0, it just loads net452 or net461 DLLs (as currently we do not have specific net5.0 build). And I think .NET is compatible from PC and MAC.