question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Deployment Outputs object is not set on deployments created with Fluent API.

See original GitHub issue

Description Deployment Outputs object is not set on deployments created with Fluent API.

To Reproduce Steps to reproduce the behavior:

  1. 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" } } }
  2. 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
  3. 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:closed
  • Created 4 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
yaohaizhcommented, Apr 1, 2021
0reactions
weidongxu-microsoftcommented, May 31, 2021

If you want to build specifically for net5.0, you can add net5.0 to csproj file.

  <PropertyGroup>
    <TargetFrameworks>net452;net461;netstandard1.4</TargetFrameworks>
  </PropertyGroup>

(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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found