简体   繁体   中英

Windows App Certification Kit - Security Features error

I am working on a UWP app and I have come across a strange issue with windows app certification kit (WACK).

The app itself runs fine but when I test the app through the WACK it always fails the certification saying that /SomePackagePath/sni.dll failed AppContainerCheck. Also, the supported APIs test shows a long list of unsupported APIs that my app doesn't use but WACK thinks it does. I have no idea why does it do that.

I have created numerous packages and tried to fix code-behind where I thought things could be wrong but to no avail. I tried to search the error on internet and I found out that my app should enable the .Net native tool chain and I checked the project settings and it is already enabled.

The WACK also says something about some linker options that should be set but I have no idea how to set those linker options in VS 2017. I am using the latest VS 2017 with all updates. Any suggestions on what to do? Any help will be greatly appreciated.

I can provide further information if anyone needs it.

The WACK report has said clearly. The "sni.dll" called some APIs which are not supported in UWP. If the "sni.dll" was made by you, I suggested that you'd better check its source code. You could check .NET for UWP apps document to see if this dll calls some unsupported APIs. If this DLL isn't made by you, you could first remove it from your project and create a package to see if it will be able to pass the WACK. Then, you will know if this issue was due to this DLL.

Beside, you could debug your code to see if you will get some exception when enable the "Compile with .NET Native Tool chain" and "Optimize code". 在此处输入图片说明

I managed to find the culprit and it was related to Jint nuget package. Apparently it uses some APIs which are not allowed in the UWP system and that also sni.dll is part of this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM