Run the following in your terminal and copy the results here.
npx react-native -v
: 4.10.1npx react-native run-windows --info
:reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
Provide a detailed list of steps that reproduce the issue.
Describe what you expected to happen.
A hello world app to run, which it does when running the app through VS, but exits with an error when running with 'npx react-native run-windows'
Exits with the following output:
Utilization: 100.0 Average Utilization: 100.0
√ Building Solution
√ React-Native Server already started
‼ Applying Add-AppDevPackage.ps1 workaround for VS 16.5-16.6 bug - see https://developercommunity.visualstudio.com/content/problem/1012921/uwp-packaging-generates-incompatible-certificate.html
√ Removing old version of the app
√ Enabling Developer Mode
√ Installing dependent framework packages
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict
validation.
Windows cannot install package 3721eb55-521f-4b4c-9c9d-afa239742a39_1.0.0.0_x86__1z456b647fn8a because this package
depends on a framework that could not be found. Provide the framework "Microsoft.VCLibs.140.00.Debug" published by
"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x86 processor
architecture and minimum version 14.0.27810.0, along with this package to install. The frameworks with name
"Microsoft.VCLibs.140.00.Debug" currently installed are: {M
Windows cannot install package 3721eb55-521f-4b4c-9c9d-afa239742a39_1.0.0.0_x86__1z456b647fn8a because this package
depends on a framework that could not be found. Provide the framework "Microsoft.VCLibs.140.00.Debug" published by
"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x86 processor
architecture and minimum version 14.0.27810.0, along with this package to install. The frameworks with name
"Microsoft.VCLibs.140.00.Debug" currently installed are:
{Microsoft.VCLibs.140.00.Debug_14.0.27810.0_x64__8wekyb3d8bbwe}
NOTE: For additional information, look for [ActivityId] 2c315fe2-6a11-0002-f36d-3e2c116ad601 in the Event Log or use
the command line Get-AppPackageLog -ActivityID 2c315fe2-6a11-0002-f36d-3e2c116ad601
At C:\users\mu.....\checkin\checkin\node_modules\react-native-windows\local-cli\runWindows\utils\WindowsStoreAppUtils.p
s1:183 char:5
- Add-AppxPackage -Path $Path -Register -ForceApplicationShutdown
~~~~~~~~~~~~~~~
- CategoryInfo : WriteError: (C:\users\mu.......ppxManifest.xml:String) [Add-AppxPackage], IOException
- FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
× Installing new version of the app from layout
× Failed to deploy: Installing new version of the app from layout
No custom code needed. It fails even with the hello world application.
Also, FYI, I tried the suggestion given in issue #5179, and while the app runs fine on Visual Studio, I still get the same error when trying to run the app using 'react-native run-windows'.
Thanks for filing a new bug @shoaib !
I'm not able to repro this though, even on a clean VM without the VCLibs debug package, it gets properly installed... :(
A couple of things to check:
.appxrecipe
. Does that file reference the x86 version of VCLibs.Debug (it should)C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs\14.0\AppX\Debug\x86\Microsoft.VCLibs.x86.Debug.14.00.appx
Thanks for filing a new bug @shoaib !
I'm not able to repro this though, even on a clean VM without the VCLibs debug package, it gets properly installed... :(
A couple of things to check:
- There should be a file under your project with extension
.appxrecipe
. Does that file reference the x86 version of VCLibs.Debug (it should)- Do you have this file on your PC:
C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs\14.0\AppX\Debug\x86\Microsoft.VCLibs.x86.Debug.14.00.appx
If so, installing that appx and re-running run-windows should unblock you, though I don't know why you might be hitting this problem since the version of RNW you are running has the fix to pre-install the VCLibs.Debug package
That did the trick. You rock @asklar. Surprisingly I was not able to find this information in any of my other searches. You might wanna add this somewhere in the documentation to avoid any future bugs related to this matter (or not, cuz this solution will now appear under any searches now) 😁
Thanks once again for your help!
Sounds like you're unblocked @shoaib , yay!