Dependency on .Net Native

2020-04-10 10:42发布

问题:

I got the following certification error when submitting to the app store.

[My App Name] takes a dependency on Microsoft .Net Native Runtime Package 1.x framework but is missing the framework dependency declaration in the manifest. [My App Name] takes a dependency on Microsoft .Net Native Framework Package 1.x framework but is missing the framework dependency declaration in the manifest.

How does one provide this dependency in the appxmanifest? What's the syntax?

I have this currently:

<Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>

回答1:

I had the same error, and I found that ticking "Optimise Code" in build options made it go away.
I find that with Microsoft poke-and see is the most reliable technique.



回答2:

Just had a similar issue. Try adding a PackageDependency line to the Package.appmanifest:

<Dependencies>
  <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
  <PackageDependency Name="Microsoft.NET.Native.Runtime.1.4" MinVersion="1.4.24201.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
</Dependencies>

See: UWP App Package created with Visual Studio 2015 Update 3 won't install on phone