Skip to content

fix for AspNetCore AddApplicationInsightsSettings() and MissingMethodException#1703

Merged
TimothyMothra merged 2 commits intodevelopfrom
tilee/fix_addapplicationinsightssettings
Feb 21, 2020
Merged

fix for AspNetCore AddApplicationInsightsSettings() and MissingMethodException#1703
TimothyMothra merged 2 commits intodevelopfrom
tilee/fix_addapplicationinsightssettings

Conversation

@TimothyMothra
Copy link
Copy Markdown

Fix Issue #1702.

Changes

  • Restore the removed method signature, now an overload.
  • Note that this brakes the method signature for anyone who took a dependency on the order of parameters instead of using named parameters.

Checklist

  • I ran Unit Tests locally.
  • CHANGELOG.md updated with one line description of the fix, and a link to the original issue if available.

For significant contributions please make sure you have completed the following items:

  • Design discussion issue #
  • Changes in public surface reviewed

The PR will trigger build, unit tests, and functional tests automatically. Please follow these instructions to build and test locally.

Notes for authors:

  • FxCop and other analyzers will fail the build. To see these errors yourself, compile localy using the Release configuration.

Notes for reviewers:

  • We support comment build triggers
    • /AzurePipelines run will queue all builds
    • /AzurePipelines run <pipeline-name> will queue a specific build

/// <param name="connectionString">Sets connection string.</param>
/// <returns>The <see cref="IConfigurationBuilder"/>.</returns>
public static IConfigurationBuilder AddApplicationInsightsSettings(this IConfigurationBuilder configurationSourceRoot, bool? developerMode = null, string endpointAddress = null, string instrumentationKey = null)
=> configurationSourceRoot.AddApplicationInsightsSettings(developerMode, endpointAddress, instrumentationKey);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method call does not seem to use connectionString parameter or assign it to null - can you take a look?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, so I was blindly trusting unit tests to catch something like this.
what actually happened was that it is an infinite loop, which crashes the test assembly and no errors get reported.
learning lots of things today

@TimothyMothra TimothyMothra merged commit 843d7e9 into develop Feb 21, 2020
TimothyMothra pushed a commit that referenced this pull request Feb 21, 2020
…Exception (#1703)

* fix for AspNetCore AddApplicationInsightsSettings() and MissingMethodException

* fix
TimothyMothra pushed a commit that referenced this pull request Feb 21, 2020
…Exception (#1703)

* fix for AspNetCore AddApplicationInsightsSettings() and MissingMethodException

* fix
@TimothyMothra TimothyMothra deleted the tilee/fix_addapplicationinsightssettings branch June 3, 2021 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants