locked
API CoCreateInstance is not supported RRS feed

  • Question

  • My Windows 10 app is failing WACK with two specific error messages:

    API CoCreateInstance in api-ms-win-core-com-l1-1-0.dll is not supported for this application type. DigitalSignage.Controller.dll calls this API.

    and

    Signcast takes a dependency on Microsoft .Net Native Framework Package 1.x framework but is missing the framework dependency declaration in the manifest.

    Here are the steps I have taken to try to eliminate these two WACK errors:

    1) Reviewed known RTM issues listed here on the forums. 

    2) Eliminated third-party DLLs except for PCLs.  The ones that I cannot remove are two PCLs that are compiled for Windows 8.1.  I can set the PCL to Windows 10 but they default back to Windows 8.1 since in theory this is compatible with UWP.  Screenshot included.

    3) Ensured that each UWP or PCL project reference does not include Nuget Packages that might somehow be incompatible. 

    4) Installed the Microsoft.NETNative.Analyzer NuGet package.  As far as I can tell it doesn't offer up any new or meaningful error messages during compilation.

    5) Disabled .NET Native (yay, everything works).  But since I need to have this poorly executed tool enabled this isn't a solution.

    Here is the WACK error that I receive on RELEASE compilation with .NET Native enabled:

    Here you can see the NuGet packages that the app references.  It's fairly vanilla -- .NETCore.UniversalWindowsPlatform, .NETNative.Analyzer, and AppInsights. 

    Here you can see that the App is referencing twoPCLs built with Windows 8.1 compatibility.  If I set either to Windows 10 UWP the setting pops back down to Windows 8 and Windows 8.1.  Neither PCL references any Nuget packages -- they are just vanilla PCLs. 

    Lastly, here is a list of the DLL/project references that the app references.

    Have you seen this before?  Any thoughts on what could be causing this WACK behavior?








    • Edited by S Tonstad Monday, January 4, 2016 6:56 PM
    Monday, January 4, 2016 5:30 PM

Answers

  • Hello,

    I believe that this is a known issue as per this page:

    https://github.com/dotnet/core/blob/master/Documentation/ilcRepro.md

    This error can occur when running the WACK with your application in Release configuration and "Optimize Code" unchecked in your project properties. Ensure that "Optimize Code" is checked when submitting your application to the Store.

    In other words, the project needs to contain:

    <Optimize>true</Optimize>

    under the property group of release configurations.

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    • Marked as answer by S Tonstad Tuesday, January 5, 2016 10:22 PM
    Tuesday, January 5, 2016 1:10 AM

All replies

  • Hello,

    I believe that this is a known issue as per this page:

    https://github.com/dotnet/core/blob/master/Documentation/ilcRepro.md

    This error can occur when running the WACK with your application in Release configuration and "Optimize Code" unchecked in your project properties. Ensure that "Optimize Code" is checked when submitting your application to the Store.

    In other words, the project needs to contain:

    <Optimize>true</Optimize>

    under the property group of release configurations.

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    • Marked as answer by S Tonstad Tuesday, January 5, 2016 10:22 PM
    Tuesday, January 5, 2016 1:10 AM
  • Thank you so much James!  This was the answer.  I had an assembly that I built in my project which was not set to optimize.  Thank you!
    Tuesday, January 5, 2016 10:23 PM