none
UWP WACK Supported API test fail, api-ms-win-core-com-l1-1-0.dll is not supported RRS feed

  • Question

  • Hi,

    have problem with validating UWP app. WACK reports next error:

    App version:
    1.1.1.0
    App Architecture:
    x64
    Kit Version:
    10.0.16299.91
    OS Version:
    Microsoft Windows 10 Pro (10.0.16299.0)
    OS Architecture:
    x64
    Report time:
    06/04/2018 18:18:06

    ...

    Error Found: The supported APIs test detected the following errors:
    • API CoCreateInstance in api-ms-win-core-com-l1-1-0.dll is not supported for this application type. MyApp.dll calls this API.

    Application tested in debug and release mode, no issues found.

    Am testing release with next settings:

    UWP app min. and target version = 16299

    Also UWP app references:

    Microsoft.NETCore.UniversalWindowsPlatform: 6.0.8

    Universal Windows: 10.0.16299.0

    Win2D.uwp : 1.21.0

    and .NETStandard library:

    Library build settings:

    For packaging I am using next settings:

    Any ideas how to solve this problem?

    Regards

    Maksim

    Friday, April 6, 2018 5:32 PM

All replies

  • Hi Maksim,

    You might also tick the Optimize code box in Configuration page.

    The CocreateInstance API is not supported in Windows universal app. Have you used it in your code? If you don't need MyApp.dll in your package, you could find it the project folder and remove all its reference in your app.

    Best regards,

    Mattew Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 9, 2018 8:59 AM
    Moderator
  • Hi Mattew,

    Thanks for response.

    I can not build project with "Optimize code" and ".NET Native" options on. I am getting next error:

    Severity Code Description Project File Line Suppression State
    Error  ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackagesFallback\microsoft.net.native.compiler\2.0.3\tools\x86\ilc\Tools\nutc_driver.exe @"C:\Users\...\MyApp\obj\x86\Release\ilc\intermediate\MDIL\MyApp.rsp"' returned exit code -1073741819 MyApp  

    Monday, April 9, 2018 6:06 PM
  • Hi Maksim,

    You might also tick the Optimize code box in Configuration page.

    The CocreateInstance API is not supported in Windows universal app. Have you used it in your code? If you don't need MyApp.dll in your package, you could find it the project folder and remove all its reference in your app.

    Best regards,

    Mattew Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thanks for answering. But how can I find it? How to find references of the app.dll? I build the code with .NEt native ticked and without, any combination tried.

    Viele Grüße

    Thomas

    Wednesday, April 11, 2018 7:44 PM
  • Hi Thomas,

    MyApp.dll is actually my UWP application. I can not build UWP app only with ".NET native" and "Optimize code" ticked. Any other combination building well, but fail to validate in WACK.  

    Also I found another bug with .NET Standard library. I can set target framework version 2.0 only if project located in MyDocuments\VisualStudio2017\Projects\ folder. In all other locations target framework 2.0 is missing.

    Also in some cases if I adding this .NETStandard library to other solutions, I can not build it:

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets(126,5): error : The current .NET SDK does not support targeting .NET Standard 2.0.  Either target .NET Standard 1.6 or lower, or use a version of the .NET SDK that supports .NET Standard 2.0.

    Trying to solve this I uninstall all Core .Net SDKs and reinstall latest one (2.1.104 (x64)) and this does' help...

    I fail to uninstall "Microsoft .NET Core 1.0.1 VS 2015 Tooling Preview 2" with error "The specified account already exists." 

    May be this "Microsoft .NET Core 1.0.1 VS 2015 Tooling Preview 2" causing problems? How to uninstall this?

    Regards,

    Maksim

    Thursday, April 12, 2018 12:12 PM
  • Hi Maksim,

    my App builds in every way finde. The problem I have is this grml*§§*@ error from WACK. I hope Mattew Wu can give me an advise.

    That's my problem:

    NICHT BESTANDEN

    Unterstützte APIs
    • Fehler: Beim Test der unterstützten APIs wurden folgende Fehler erkannt:
      • API CoCreateInstance in api-ms-win-core-com-l1-1-0.dll wird für diesen Anwendungstyp nicht unterstützt. EasyCatz.dll ruft diese API auf.

    I have no idea hao to solve this. I changed a lot of lines of code but no hope to solve the WACK test. The only thing I found was in the ilclog,csv:

    Message,Normal,"          P/Invoke ""CoCreateInstance"" mit [DllImport(ExactSpelling=true)] wurde in ""api-ms-win-core-com-l1-1-0.dll!CoCreateInstance"" aufgelöst."

    and in the PInvoke.g.cs

    public unsafe static partial class api_ms_win_core_com_l1_1_0_dll
    	{
    		// Signature, CoCreateInstance, [fwd] [return] [EETypeRva:0x00041698] int__int, [fwd] [in] [EETypeRva:0x00041698] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x00041698] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x00041698] int__int, [fwd] [in] [EETypeRva:0x00041698] byte___ptrunsigned char *, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041698] System_IntPtr____w64 int, 
    		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.StackTraceGenerator, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Internal.StackTraceGenerator.StackTraceGenerator", "CoCreateInstance")]
    		public static int CoCreateInstance(
    					byte* rclsid, 
    					global::System.IntPtr pUnkOuter, 
    					int dwClsContext, 
    					byte* riid, 
    					out global::System.IntPtr ppv)
    		{
    			// Setup
    			int unsafe___value;
    			// Marshalling
    			fixed (global::System.IntPtr* pinned_ppv = &(ppv))
    			{
    				// Call to native method
    				unsafe___value = global::__Interop.api_ms_win_core_com_l1_1_0_dll_PInvokes.CoCreateInstance(
    									((byte*)rclsid), 
    									pUnkOuter, 
    									dwClsContext, 
    									((byte*)riid), 
    									pinned_ppv
    								);
    				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
    			}
    			// Return
    			return unsafe___value;
    		}
    	}

    Where does this CoCreateInstsance come from? 

    Viele Grüße

    Thomas

    /edit
    Anyway. I created a new project and transfered all objects from the old app to the new one. Nothing changed in code. Surprise surprise, everything worked like charm! No error, WACK ended up succesfully.

     
    Friday, April 13, 2018 10:14 AM
  • I did not find solution for that problem, but today I finally got good build.

    What I did: I created new Net.Standard library and port all files from old Portable library to new. Reference to Standard library was added using dll file (I can not add Standard library to UWP solution - missing version 2.X problem). And magic happens, UWP app builds with Optimize and  ".NET native" flags ! And no validation errors !

    Eagled by great result I tried to build project using old portable library, and fail with same problem...

    For now only one solution who have same problem, to build project in Release with Optimize and use .Net chain flags.

    Thursday, May 31, 2018 6:24 PM