Skip to content

Warning MCG0007 appears in release mode #134

@pekspro

Description

@pekspro

Describe the bug

When building in release mode and targeting x86/x64/ARM you get a lot of warnings like this:

  MCG : warning MCG0007: Unresolved P/Invoke method '/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation!CFArrayCreateMutable' for method 'System.IntPtr Microsoft.Identity.Extensions.Mac.CoreFoundation.CFArrayCreateMutable(System.IntPtr, System.Int64, System.IntPtr)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.

Looks a bit dangerous. Could this be safely ignored?

Steps to Reproduce

Steps to reproduce the behavior:

  1. Select the project UwpMsalProviderSample.
  2. Select x86.
  3. Rebuild solution.

Expected behavior

No warnings are expected.

Environment

This is based on a clone of this repository with no changes.

Windows 10 Build Number:

  • Fall Creators Update (16299)
  • April 2018 Update (17134)
  • October 2018 Update (17763)
  • May 2019 Update (18362)

App min and target version:

  • Fall Creators Update (16299)
  • April 2018 Update (17134)
  • October 2018 Update (17763)
  • May 2019 Update (18362)
  • 2004 Update (19041)

Device form factor:

  • Desktop

Visual Studio

  • 2019 (version: 16.10.4)

Additional context

No warnings like this are generated in Debug mode.

Removing the references to Microsoft.Identity.Client.Extensions.Msal and Microsoft.Graph also removes these warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions