none
UWP Create App Package fails for release mode

    Question

  • I am trying to create app package for a UWP app (side loading) in release mode it fails with below error. It works fine for debug mode

    Severity Code Description Project File Line Suppression State Error ILT0021: Could not resolve type 'System.Security.SecurityZone' MyApp.ModuleName

    enter image description here enter image description here

    Project Properties enter image description here

    When I enable Compile with .NET Native tool chain, I get following error

    Severity Code Description Project File Line Suppression State Error ILT0005: 'C:\Users\username.nuget\packages\runtime.win10-x86.microsoft.net.native.compiler\2.1.8\tools\x86\ilc\ilc.exe --gatekeeper @"C:\Projects......\obj\x86\Release\ilc\intermediate\gkargs.rsp"' returned exit code 1 MyApp.Module

    When I try to do build on Azure DevOps I get this error

    (BuildNativePackage target) -> 2019-02-06T15:14:28.4996296Z
    C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.1\tools\Microsoft.NetNative.targets(792,5): error : ILT0021: Could not resolve type 'System.Security.SecurityZone' [D:\a\1\s\ProjectFolder\MyApp.ModuleName.csproj]

    posted it first here: https://stackoverflow.com/questions/54529377/uwp-create-app-package-fails-for-release-mode

    Thanks Henry http://www.RedandBlueGraphics.com

    Friday, February 8, 2019 5:34 AM

All replies

  • Hello Henry,

    Can you check your code to see whether you are using any code which will involve this "System.Security.SecurityZone". To think about a workaround I need to understand what you want to do. And like "Bite" mentioned in your stackoverflow post, the code SecurityZone is not working on a UWP project, so how did you add this code to your project? Any steps for us to reproduce your issue from ourside?

    Best regards,

    Barry


    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, February 11, 2019 2:21 AM
    Moderator
  • I don't see any reference to System.Security.SecurityZone in my project or solution.Made some progress, when generating package, I removed (unchecked) x64 & ARM and ran a package creation. It completed and showed this report.

    Windows security features test
    FAILED
    Binary analyzer

        File C:\Program Files\windowsapps\smartpile.inspector.xlite_1.0.19.0_x86__7p23rrj50tgdp\clrcompression.dll has failed the AppContainerCheck check.
        File C:\Program Files\windowsapps\smartpile.inspector.xlite_1.0.19.0_x86__7p23rrj50tgdp\mi.dll has failed the AppContainerCheck check.
        File C:\Program Files\windowsapps\smartpile.inspector.xlite_1.0.19.0_x86__7p23rrj50tgdp\Microsoft.Management.Infrastructure.Native.Unmanaged.dll has failed the AppContainerCheck check.
        File C:\Program Files\windowsapps\smartpile.inspector.xlite_1.0.19.0_x86__7p23rrj50tgdp\miutils.dll has failed the AppContainerCheck check.
        File C:\Program Files\windowsapps\smartpile.inspector.xlite_1.0.19.0_x86__7p23rrj50tgdp\pwrshplugin.dll has failed the AppContainerCheck check.

    Supported API test

    FAILED
    Supported APIs


        API CLSIDFromProgID in api-ms-win-core-com-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Utility.dll calls this API.
        API SetLocalTime in api-ms-win-core-sysinfo-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Utility.dll calls this API.
        API LoadLibraryEx in api-ms-win-core-libraryloader-l1-2-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Diagnostics.dll calls this API.
        API LoadLibraryExW in api-ms-win-core-libraryloader-l1-2-0.dll is not supported for this application type. Microsoft.Management.Infrastructure.Native.Unmanaged.dll calls this API.
        API UnhandledExceptionFilter in api-ms-win-core-errorhandling-l1-1-1.dll is not supported for this application type. Microsoft.Management.Infrastructure.Native.Unmanaged.dll calls this API.
        API _XcptFilter in msvcrt.dll is not supported for this application type. Microsoft.Management.Infrastructure.Native.Unmanaged.dll calls this API.
        API _amsg_exit in msvcrt.dll is not supported for this application type. Microsoft.Management.Infrastructure.Native.Unmanaged.dll calls this API.
        API _except_handler4_common in msvcrt.dll is not supported for this application type. Microsoft.Management.Infrastructure.Native.Unmanaged.dll calls this API.
        API _initterm in msvcrt.dll is not supported for this application type. Microsoft.Management.Infrastructure.Native.Unmanaged.dll calls this API.
        API free in msvcrt.dll is not supported for this application type. Microsoft.Management.Infrastructure.Native.Unmanaged.dll calls this API.
        API malloc in msvcrt.dll is not supported for this application type. Microsoft.Management.Infrastructure.Native.Unmanaged.dll calls this API.
        API memset in msvcrt.dll is not supported for this application type. Microsoft.Management.Infrastructure.Native.Unmanaged.dll calls this API.
        API LoadLibraryExW in kernel32.dll is not supported for this application type. clrcompression.dll calls this API.
        API UnhandledExceptionFilter in kernel32.dll is not supported for this application type. clrcompression.dll calls this API.
        API CreateFileW in api-ms-win-core-file-l1-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API GetFileInformationByHandle in api-ms-win-core-file-l1-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API QueryDosDeviceW in api-ms-win-core-file-l1-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API PrivilegeCheck in api-ms-win-security-base-l1-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptDuplicateKey in api-ms-win-security-cryptoapi-l1-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CreateToolhelp32Snapshot in api-ms-win-core-toolhelp-l1-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API Process32First in api-ms-win-core-toolhelp-l1-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API Process32Next in api-ms-win-core-toolhelp-l1-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API LoadLibraryExW in api-ms-win-core-libraryloader-l1-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API DosDateTimeToFileTime in api-ms-win-core-kernel32-legacy-l1-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API PathGetDriveNumberW in api-ms-win-core-shlwapi-legacy-l1-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API PathIsUNCW in api-ms-win-core-shlwapi-legacy-l1-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CreateHardLinkW in api-ms-win-core-file-l2-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CreateSymbolicLinkW in api-ms-win-core-file-l2-1-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API AddScopedPolicyIDAce in api-ms-win-security-base-l1-2-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API GetOEMCP in api-ms-win-core-localization-l1-2-0.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API FindFirstStreamW in api-ms-win-core-file-l1-2-2.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API FindNextStreamW in api-ms-win-core-file-l1-2-2.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API NetShareEnum in netapi32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API LsaQueryCAPs in advapi32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API SaferCloseLevel in advapi32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API SaferComputeTokenFromLevel in advapi32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API SaferIdentifyLevel in advapi32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CreateFileW in kernel32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API ProcessIdToSessionId in kernel32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API FindExecutableA in shell32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API SHGetFileInfo in shell32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API SHGetKnownFolderPath in shell32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API GetDesktopWindow in user32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API GetForegroundWindow in user32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API SetForegroundWindow in user32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API ShowWindow in user32.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManCloseCommand in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManCloseOperation in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManCloseSession in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManCloseShell in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManConnectShell in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManConnectShellCommand in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManCreateSession in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManCreateShellEx in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManDeinitialize in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManDisconnectShell in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManGetErrorMessage in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManGetSessionOptionAsDword in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManGetSessionOptionAsString in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManInitialize in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManPluginGetOperationParameters in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManPluginOperationComplete in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManPluginReceiveResult in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManPluginReportContext in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManReceiveShellOutput in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManReconnectShell in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManReconnectShellCommand in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManRunShellCommandEx in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManSendShellInput in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManSetSessionOption in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WSManSignalShell in wsmsvc.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API HcsCreateProcess in vmcompute.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API HcsGetComputeSystemProperties in vmcompute.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API HcsOpenComputeSystem in vmcompute.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API HcsOpenProcess in vmcompute.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API HcsTerminateProcess in vmcompute.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CreateHardLink in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CreateSymLink in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API FollowSymLink in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API GetCurrentThreadId in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API GetErrorCategory in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API GetFullyQualifiedName in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API GetInodeData in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API GetLinkCount in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API GetPPid in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API GetUserFromPid in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API GetUserName in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API IsExecutable in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API IsSameFileSystemItem in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API IsSymLink in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API SetDate in libpsl-native.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API AmsiCloseSession in amsi.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API AmsiInitialize in amsi.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API AmsiOpenSession in amsi.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API AmsiScanBuffer in amsi.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API AmsiScanString in amsi.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API AmsiUninitialize in amsi.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CredUIPromptForCredentialsW in credui.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptUIWizDigitalSign in cryptui.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API NtQueryInformationProcess in ntdll.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API RtlZeroMemory in ntdll.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WldpGetLockdownPolicy in wldp.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WldpIsClassInApprovedList in wldp.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WNetAddConnection2W in mpr.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WNetCancelConnection2W in mpr.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WNetGetConnectionW in mpr.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATAdminAcquireContext2 in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATAdminCalcHashFromFileHandle2 in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATAdminReleaseContext in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATCDFClose in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATCDFEnumAttributesWithCDFTag in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATCDFEnumCatAttributes in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATCDFEnumMembersByCDFTagEx in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATCDFOpen in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATClose in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATEnumerateAttr in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATEnumerateCatAttr in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATEnumerateMember in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATOpen in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API CryptCATStoreFromHandle in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WTGetSignatureInfo in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WTHelperGetProvCertFromChain in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WTHelperGetProvSignerFromChain in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WTHelperProvDataFromStateData in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API WinVerifyTrust in wintrust.dll is not supported for this application type. System.Management.Automation.dll calls this API.
        API RegCloseKey in advapi32.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API RegEnumKeyExW in advapi32.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API RegOpenKeyExW in advapi32.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API RegQueryValueExW in advapi32.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API CreateFileW in kernel32.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API GetModuleHandleA in kernel32.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API GetModuleHandleExA in kernel32.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API GetModuleHandleW in kernel32.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API LCMapStringW in kernel32.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API LoadLibraryExA in kernel32.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API LoadLibraryExW in kernel32.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API UnhandledExceptionFilter in kernel32.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API WSManPluginOperationComplete in wsmsvc.dll is not supported for this application type. pwrshplugin.dll calls this API.
        API EvtArchiveExportedLog in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtCancel in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtClearLog in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtClose in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtCreateBookmark in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtCreateRenderContext in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtExportLog in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtFormatMessage in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtGetChannelConfigProperty in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtGetEventInfo in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtGetEventMetadataProperty in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtGetLogInfo in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtGetObjectArrayProperty in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtGetObjectArraySize in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtGetPublisherMetadataProperty in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtGetQueryInfo in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtNext in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtNextChannelPath in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtNextEventMetadata in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtNextPublisherId in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtOpenChannelConfig in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtOpenChannelEnum in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtOpenEventMetadataEnum in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtOpenLog in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtOpenPublisherEnum in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtOpenPublisherMetadata in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtOpenSession in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtQuery in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtRender in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtSaveChannelConfig in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtSeek in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtSetChannelConfigProperty in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API EvtUpdateBookmark in wevtapi.dll is not supported for this application type. Microsoft.PowerShell.CoreCLR.Eventing.dll calls this API.
        API RegCloseKey in api-ms-win-core-registry-l1-1-0.dll is not supported for this application type. miutils.dll calls this API.
        API RegEnumKeyExW in api-ms-win-core-registry-l1-1-0.dll is not supported for this application type. miutils.dll calls this API.
        API RegGetValueW in api-ms-win-core-registry-l1-1-0.dll is not supported for this application type. miutils.dll calls this API.
        API RegOpenKeyExW in api-ms-win-core-registry-l1-1-0.dll is not supported for this application type. miutils.dll calls this API.
        API RegQueryValueExW in api-ms-win-core-registry-l1-1-0.dll is not supported for this application type. miutils.dll calls this API.
        API GetModuleHandleW in api-ms-win-core-libraryloader-l1-2-0.dll is not supported for this application type. miutils.dll calls this API.
        API LoadLibraryExW in api-ms-win-core-libraryloader-l1-2-0.dll is not supported for this application type. miutils.dll calls this API.
        API LoadStringW in api-ms-win-core-libraryloader-l1-2-0.dll is not supported for this application type. miutils.dll calls this API.
        API UnhandledExceptionFilter in api-ms-win-core-errorhandling-l1-1-1.dll is not supported for this application type. miutils.dll calls this API.
        API CoCreateInstance in api-ms-win-core-com-l1-1-1.dll is not supported for this application type. miutils.dll calls this API.
        API GetThreadPreferredUILanguages in api-ms-win-core-localization-l1-2-1.dll is not supported for this application type. miutils.dll calls this API.
        API GetComputerNameExW in api-ms-win-core-sysinfo-l1-2-1.dll is not supported for this application type. miutils.dll calls this API.
        API RtlGetCurrentProcessorNumber in ntdll.dll is not supported for this application type. miutils.dll calls this API.
        API ??0exception@@QAE@ABQBD@Z in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API ??0exception@@QAE@ABV0@@Z in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API ??0exception@@QAE@XZ in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API ??1exception@@UAE@XZ in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API ??1type_info@@UAE@XZ in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API ?terminate@@YAXXZ in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API ?what@exception@@UBEPBDXZ in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _CxxThrowException in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _XcptFilter in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API __CxxFrameHandler3 in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API __dllonexit in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API __iob_func in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _amsg_exit in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _except_handler4_common in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _i64tow_s in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _initterm in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _lock in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _onexit in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _purecall in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _swprintf_c in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _ui64tow_s in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _unlock in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _vsnwprintf in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _wcsdup in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _wcsicmp in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _wcsnicmp in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _wcstoi64 in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _wcstoui64 in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API _wtoi in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API free in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API fwprintf in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API getenv in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API malloc in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API memcmp in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API memcpy in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API memcpy_s in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API memmove_s in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API memset in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API swscanf_s in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API wcschr in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API wcscpy_s in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API wcsstr in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API wcstod in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API wcstol in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API wcstoul in msvcrt.dll is not supported for this application type. miutils.dll calls this API.
        API RegCloseKey in advapi32.dll is not supported for this application type. Microsoft.Win32.Registry.dll calls this API.
        API RegConnectRegistryW in advapi32.dll is not supported for this application type. Microsoft.Win32.Registry.dll calls this API.
        API RegCreateKeyExW in advapi32.dll is not supported for this application type. Microsoft.Win32.Registry.dll calls this API.
        API RegDeleteKeyExW in advapi32.dll is not supported for this application type. Microsoft.Win32.Registry.dll calls this API.
        API RegDeleteValueW in advapi32.dll is not supported for this application type. Microsoft.Win32.Registry.dll calls this API.
        API RegEnumKeyExW in advapi32.dll is not supported for this application type. Microsoft.Win32.Registry.dll calls this API.
        API RegEnumValueW in advapi32.dll is not supported for this application type. Microsoft.Win32.Registry.dll calls this API.
        API RegFlushKey in advapi32.dll is not supported for this application type. Microsoft.Win32.Registry.dll calls this API.
        API RegOpenKeyExW in advapi32.dll is not supported for this application type. Microsoft.Win32.Registry.dll calls this API.
        API RegQueryInfoKeyW in advapi32.dll is not supported for this application type. Microsoft.Win32.Registry.dll calls this API.
        API RegQueryValueExW in advapi32.dll is not supported for this application type. Microsoft.Win32.Registry.dll calls this API.
        API RegSetValueExW in advapi32.dll is not supported for this application type. Microsoft.Win32.Registry.dll calls this API.
        API CreateFileW in api-ms-win-core-file-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API SetDynamicTimeZoneInformation in api-ms-win-core-timezone-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API PowerDeterminePlatformRoleEx in api-ms-win-power-base-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API CloseServiceHandle in api-ms-win-service-management-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API CreateServiceW in api-ms-win-service-management-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API DeleteService in api-ms-win-service-management-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API OpenSCManagerW in api-ms-win-service-management-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API OpenServiceW in api-ms-win-service-management-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API SendMessageTimeout in ext-ms-win-rtcore-ntuser-window-ext-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API AssignProcessToJobObject in api-ms-win-core-job-l2-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API CreateJobObject in api-ms-win-core-job-l2-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API QueryInformationJobObject in api-ms-win-core-job-l2-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API ChangeServiceConfig2W in api-ms-win-service-management-l2-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API ChangeServiceConfigW in api-ms-win-service-management-l2-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API QueryServiceConfig2W in api-ms-win-service-management-l2-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API QueryServiceConfigW in api-ms-win-service-management-l2-1-0.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API PrivilegeCheck in api-ms-win-downlevel-advapi32-l1-1-1.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API GetFirmwareType in api-ms-win-core-kernel32-legacy-l1-1-1.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API GetPhysicallyInstalledSystemMemory in api-ms-win-core-sysinfo-l1-2-1.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API SLGetWindowsInformationDWORD in slc.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API LCIDToLocaleName in kernelbase.dll is not supported for this application type. Microsoft.PowerShell.Commands.Management.dll calls this API.
        API sysctl in libc.dll is not supported for this application type. Microsoft.DotNet.PlatformAbstractions.dll calls this API.
        API RtlGetVersion in ntdll.dll is not supported for this application type. Microsoft.DotNet.PlatformAbstractions.dll calls this API.
        API CreateFileW in api-ms-win-core-file-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.ConsoleHost.dll calls this API.
        API GetDC in ext-ms-win-ntuser-dc-access-ext-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.ConsoleHost.dll calls this API.
        API ReleaseDC in ext-ms-win-ntuser-dc-access-ext-l1-1-0.dll is not supported for this application type. Microsoft.PowerShell.ConsoleHost.dll calls this API.
        API ScrollConsoleScreenBuffer in api-ms-win-core-console-l2-1-0.dll is not supported for this application type. Microsoft.PowerShell.ConsoleHost.dll calls this API.
        API SendInput in ext-ms-win-ntuser-keyboard-l1-2-1.dll is not supported for this application type. Microsoft.PowerShell.ConsoleHost.dll calls this API.
        API CoCreateInstance in ole32.dll is not supported for this application type. Microsoft.PowerShell.ConsoleHost.dll calls this API.
        API GetStartupInfoW in kernel32.dll is not supported for this application type. Microsoft.PowerShell.ConsoleHost.dll calls this API.
        API ShowWindow in user32.dll is not supported for this application type. Microsoft.PowerShell.ConsoleHost.dll calls this API.
        API EnterCriticalPolicySection in userenv.dll is not supported for this application type. Microsoft.WSMan.Management.dll calls this API.
        API LeaveCriticalPolicySection in userenv.dll is not supported for this application type. Microsoft.WSMan.Management.dll calls this API.
        API ImpersonateSelf in api-ms-win-security-base-l1-2-0.dll is not supported for this application type. mi.dll calls this API.
        API LoadLibraryExW in api-ms-win-core-libraryloader-l1-2-0.dll is not supported for this application type. mi.dll calls this API.
        API LoadStringW in api-ms-win-core-libraryloader-l1-2-0.dll is not supported for this application type. mi.dll calls this API.
        API UnhandledExceptionFilter in api-ms-win-core-errorhandling-l1-1-1.dll is not supported for this application type. mi.dll calls this API.
        API RtlEqualSid in ntdll.dll is not supported for this application type. mi.dll calls this API.
        API _XcptFilter in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API _amsg_exit in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API _except_handler4_common in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API _i64tow_s in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API _initterm in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API _set_output_format in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API _ui64tow_s in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API _wcsicmp in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API free in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API malloc in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API memcpy in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API memset in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API swprintf_s in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API wcscpy_s in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API wcstoul in msvcrt.dll is not supported for this application type. mi.dll calls this API.
        API ExecuteAssembly in uwphost.dll is not supported for this application type. SmartPileInspector.xLite.exe calls this API.
        API DllGetActivationFactory in uwphost.dll is not supported for this application type. SmartPileInspector.xLite.exe has an export that forwards to this API.

    Then I removed all those nuget packages I was using for Power Shell and other

    After that I got these errors

    Windows security features test
    FAILED
    Binary analyzer
        • Error Found: The binary analyzer test detected the following errors:
          • File C:\Program Files\windowsapps\smartpile.inspector.xlite_1.0.19.0_x86__7p23rrj50tgdp\clrcompression.dll has failed the AppContainerCheck check.
    Supported API test
    FAILED
    Supported APIs
    • Error Found: The supported APIs test detected the following errors:
      • API LoadLibraryExW in kernel32.dll is not supported for this application type. clrcompression.dll calls this API.
      • API UnhandledExceptionFilter in kernel32.dll is not supported for this application type. clrcompression.dll calls this API.
      • API sysctl in libc.dll is not supported for this application type. Microsoft.DotNet.PlatformAbstractions.dll calls this API.
      • API RtlGetVersion in ntdll.dll is not supported for this application type. Microsoft.DotNet.PlatformAbstractions.dll calls this API.
      • API ExecuteAssembly in uwphost.dll is not supported for this application type. SmartPileInspector.xLite.exe calls this API.
  • API DllGetActivationFactory in uwphost.dll is not supported for this application type. SmartPileInspector.xLite.exe has an export that forwards to this API.

    How do I fix it?


    Thanks Henry http://www.RedandBlueGraphics.com

    Monday, February 11, 2019 12:56 PM
  • @Henry,

    The supported API test has some info for us:

    https://docs.microsoft.com/en-us/windows/uwp/debug-test-perf/windows-app-certification-kit-tests#supported-api-test

    So first of all, please check whether you are actually use some mentioned dlls. Like: Microsoft.PowerShell.Commands.Utility.dll, pwrshplugin.dll,miutils.dll...... There are APIs that are not supported in UWP platform so you have to choose the right version of Dll to use first.

    Then the following error "clrcompression.dll has failed the AppContainerCheck check" seems tell us that the pacakge you upload seems not a .NET Native package. So you are testing this with a debug build of your package?

    By the way, if you haven't reference System.Security.SecurityZone, is it possible that some of your dlls are using it? Have you checked your dlls first? What about also create a new project from UWP template and test it, it will help us understand whether your Visual Studio/Templates/WACK tool has any problem.

    Best regards,

    Barry


    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.

    Tuesday, February 12, 2019 9:05 AM
    Moderator