Related Versions of Windows for Windows

I have a problem with my application version. After the retarget application stores the application in the universal project of the Windows platform, I cannot start the application in release mode if the Compile with .NET Native tool chain option is enabled.

I get an error message:

Exception System.Private.Reflection.Core.dll : System.Reflection.MissingRuntimeArtifactException in System.Private.Reflection.Core.dll

Additional Information: MakeGenericMethod() cannot create this generic method because the instance was not included with metadata: System.Linq.Enumerable.Distinct<System.Char>(System.Collections.Generic.IEnumerable<System.Char>) For more information visit http://go.microsoft.com/fwlink/?LinkID=616868

When I disable compilation using the .NET Native tool chain application, it works and does not throw an exception. This is usually a solution, but in the Windows application certification bundle I get an unsuccessful result with errors (API with testing support):

. The ExecuteAssembly API in uwphost.dll for this type of application is not supported. App.exe calls this API. Β· The DllGetActivationFactory API in uwphost.dll not supported for this type of application. App.exe has an export that is forwarded to this API. Β· The OpenSemaphore API in ap-ms-win-core-synch-11-1-0.dll not supported for this type of application. System.Threading.dll calls this API. The CreateSemaphore API in api-ms-win-core-kernel32-legacy-11-1-0.dll not supported for this type of application. System.Threading.dll calls this API.

Can anybody help?

+5
source share
1 answer

The .NET Native framework does not include a JIT compiler. As a result, all necessary native code must be generated in advance. A set of heuristics is used to determine which code should be generated, but these heuristics cannot cover all possible metaprogramming scenarios. Therefore, you should provide hints for these metaprogramming scenarios using runtime directives. If the necessary metadata or implementation code is not available at run time, your application throws a MissingMetadataException, a MissingRuntimeArtifactException, or a MissingInteropDataException. Two troubleshooting tools are available that will generate an appropriate entry for your runtime directive file that throws an exception:

  • MissingMetadataException troubleshooter for types.
  • MissingMetadataException troubleshooter for methods.

See here: https://msdn.microsoft.com/en-us/Library/dn600640%28v=vs.110%29.aspx

0
source

All Articles