I have a solution as follows:
- App 1 Project (Universal Windows App)
- Portable Class Library Project (Target Window 8, .NET 4.5, ASP.NET Core)
- Style Class Library Project (Universal Windows App)
I have build configurations debug & release configured identically (at least I hope so), except using .net native in release Configuration.
When creating a AppXBundle for App 1 using the wizard in VS2017, it creates different results for the detected dependencies:
Debug\Dependencies\x64:
- Microsoft.VCLibs.x64.14.00.appx
- Microsoft.NET.CoreRuntime.1.1.appx
Release\Dependencies\x64:
- Microsoft.VCLibs.x64.14.00.appx
- Microsoft.NET.Native.Runtime.1.6.appx
- Microsoft.NET.Native.Framework.1.6.appx
- Microsoft.NET.CoreRuntime.1.1.appx
When installing the App-X Package created in debug configuration, using the generated Add-AppDevPackage.ps1, everything works fine. When doing the same thing with the App-X Package created in release configuration, I get the following error:
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation. Windows cannot install package 93ede192-831a-47ed-b309-5c4901fd7ffc because package Microsoft.NET.CoreRuntime.1.1 was provided but not used. This could be because package 93ede192-831a-47ed-b309-5c4901fd7ffc does not depend on Microsoft.NET.CoreRuntime.1.1. Only the packages that package 93ede192-831a-47ed-b309-5c4901fd7ffc depends on can be installed.
Assumption: The Microsoft.NET.CoreRuntime.1.1.appx dependency should not be added during package creating, as .net native is selected in Release Configuration. When removing the file manually after package creation, installation works.
Question: Why is this dependency added in release configuration? Is this a bug?
Note: On Project Style Class Library Project (Universal Windows App), there is no option to enable .NET native on the build tab, I think because of its output type (Class Library). Root cause?
Thanks