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

C# "Windows Runtime Component (Universal Windows)" inside C++ solution causes Windows App Certification Kit to fail "Supported API Test" #35018

Open
giregk opened this issue Apr 15, 2020 · 1 comment
Labels
Milestone

Comments

@giregk
Copy link

giregk commented Apr 15, 2020

I'm building a React-Native-Windows project, which has a UWP C++ core.

I need to add a custom native component to this project, so I've added a C# project using "Windows Runtime Component (Universal WIndows)".

My code runs locally in debug and release mode, for both x64 and x86 platforms.

However, when I create my app package for publication to the store, the Windows App Certification Kit fails the "Supported API test" with this error:

API _XcptFilter in msvcrt.dll is not supported for this application type. clrcompression.dll calls this API.
API __C_specific_handler in msvcrt.dll is not supported for this application type. clrcompression.dll calls this API.
API _amsg_exit in msvcrt.dll is not supported for this application type. clrcompression.dll calls this API.
API _initterm in msvcrt.dll is not supported for this application type. clrcompression.dll calls this API.
API free in msvcrt.dll is not supported for this application type. clrcompression.dll calls this API.
API malloc in msvcrt.dll is not supported for this application type. clrcompression.dll calls this API.
API memcpy in msvcrt.dll is not supported for this application type. clrcompression.dll calls this API.
API memset in msvcrt.dll is not supported for this application type. clrcompression.dll calls this API.
API __CxxFrameHandler4 in vcruntime140_1_app.dll is not supported for this application type. TestRNWRelease.exe calls this API.
API ExecuteAssembly in uwphost.dll is not supported for this application type. UWPShim.exe calls this API.
API DllGetActivationFactory in uwphost.dll is not supported for this application type. UWPShim.exe has an export that forwards to this API.

I have found this issue which looks similar.

The solution seems to be to remove the "Microsoft.NETCore.Portable.Compatibility" dependency from the "Microsoft.NETCore.UniversalWindowsPlatform" NuGet package. But I don't know how to do that.

(Note that I am still a beginer with Visual Studio).

I have create this demo project that have the issue.
Besides, I have opened an issue on the react-native-windows project where they suggested I opened an issue here.

Any ideas how to fix this ?

@asklar
Copy link

asklar commented Jul 29, 2020

this is because the C++ project lacks the .net native compiler nuget package reference. See this page for details and Raymond's blog post on it too.

@tommcdon I think there was some effort to make this easier/automatic in VS, is that right?

@tommcdon tommcdon removed the untriaged New issue has not been triaged by the area owner label Aug 31, 2020
@tommcdon tommcdon added this to the Future milestone Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants