Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning MCG0007 appears in release mode #134

Closed
5 of 11 tasks
pekspro opened this issue Jul 24, 2021 · 3 comments
Closed
5 of 11 tasks

Warning MCG0007 appears in release mode #134

pekspro opened this issue Jul 24, 2021 · 3 comments
Labels
bug 🐛 Something isn't working
Milestone

Comments

@pekspro
Copy link
Contributor

pekspro commented Jul 24, 2021

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.

@pekspro pekspro added the bug 🐛 Something isn't working label Jul 24, 2021
@ghost ghost added the needs triage 🔍 label Jul 24, 2021
@ghost
Copy link

ghost commented Jul 24, 2021

Hello pekspro, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@shweaver-MSFT
Copy link
Member

Hey @pekspro, thanks for submitting this. That does seem suspicious. I'll investigate and post what I find.

@shweaver-MSFT
Copy link
Member

@pekspro I looked into this a bit and I don't think it is a concern. I was able to see the warnings you mentioned, but they only happen when building the samples in Release mode. Any of the other packages that we ship (CommunityToolkit.*) all build with clean output in Debug and Release mode 👍

@shweaver-MSFT shweaver-MSFT added this to the 7.1.0 milestone Aug 6, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants