React-native-windows: When deploying an app from layout, we should deploy dependencies

Created on 11 Jun 2020  路  11Comments  路  Source: microsoft/react-native-windows

The current deploy from layout codepath assumes that all dependencies (e.g. MUX 2.4, .net / VCLibs) are installed but this isn't true in a clean machine. Installing apps from the store might bring these dependencies onto the box but we should do so if this is a clean machine too.

Otherwise the app fails to deploy when doing run-windows.

Fix: when deploying the app from layout we should also deploy something like this first:
Add-AppxPackage windows\ReactUWPTestApp\AppPackages\ReactUWPTestApp_1.0.0.0_x86_Debug_Test\Dependencies\x86\*

Developer First Experience bug

All 11 comments

By chance, is there a workaround until a fix comes out?

Hi @russpitre - in the meantime you should be able to get unblocked by opening the solution file in Visual Studio (look for a file with the sln extension in the app's windows directory) and then trying to build and deploy the app. Once VS is able to deploy the app, it will have preinstalled the framework package Microsoft.VCLibs.140.00.Debug etc. so from that point on you can just use run-windows as per usual.

It would also be nice if in System requirements they could just mention the package you are supposed to install if that is possible.

The solution of opening it in visual studio also didn't work for me

The solution of opening it in visual studio also didn't work for me

@zwhitchcox just double checking that you not only opened the solution but also built and deployed it from VS ?

Oh, I'll try that, thanks. I tried to built it, but there was a bug I'll see if I can fix the bug though. I figured it probably just wouldn't ever fully deploy from visual studio

Ok, I just saw where you said

opening the solution file in Visual Studio (look for a file with the sln extension in the app's windows directory) and then trying to build and deploy the app

I took that to mean "build and deploy" with react native haha.

But that worked! Much obliged, thank you sir

@zwhitchcox glad to hear that! from now on you should be able to build/deploy from the react native command line, it just needed the initial bootstrap to install some framework package, which VS does when deploying within VS :)

I am running into the same issue and have had no luck fixing it. I tried building and debugging/deploying with VS, 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'.

@asklar, any other suggestions on debugging this issue?

@shoaib can you please file a new issue? please include what version of rnw you're using per the issue template etc. Thanks!

@shoaib can you please file a new issue? please include what version of rnw you're using per the issue template etc. Thanks!

Done. Created a new issue #5653. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

syedibrahimt picture syedibrahimt  路  3Comments

chai41104 picture chai41104  路  3Comments

JunielKatarn picture JunielKatarn  路  3Comments

tahakhozooie picture tahakhozooie  路  4Comments

qmatteoq picture qmatteoq  路  3Comments