You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/nuget.md
+6-48Lines changed: 6 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -5,56 +5,14 @@ title: Using Microsoft.ReactNative NuGet packages
5
5
6
6
>**This documentation and the underlying platform code is a work in progress.**
7
7
8
-
The default for React Native Windows has been to build all code from source. This includes building all the code shipped by the team in the npm package from source. This code can be quite large and take a long time to build as well as require a high-performance computer. Some configurations have problems building this code with only 8 GB of memory. Especially if you are used to working only with managed code, this can be a big surprise.
8
+
When creating a new project in [Get Started with Windows](getting-started.md), the type of template selected for the [init-windows command](init-windows-cli.md) will determine whether or not the project will built against the `react-native-windows` source or the pre-built NuGet packages.
9
9
10
-
Starting with version 0.64 the team offers experimental NuGet packages that can be used as a replacement of compiling the sources.
10
+
Traditionally, the default for React Native Windows has been to build all code from source. This includes building all the code shipped by the team in the npm package from source. The amount of code is quite large and takes both a long time to build as well as requiring a high-performance computer. Some configurations have problems building this code with only 8 GB of memory. Especially if you are used to working only with managed code, this can be a big surprise.
11
11
12
-
> Disclaimer: There are known compatibility issues with [community modules](supported-community-modules.md), as they still rely on building the shared code from source. So the solution still needs to have all the source projects which puts all the build performance problems back.
12
+
Starting with the (currently experimental) New Architecture (i.e. Fabric) app and module projects, React Native Windows will default to consuming pre-built binary NuGet packages instead of requiring you to compile everything yourself.
13
13
14
-
The benefit of using NuGet packages is that you get improved compilation times for your Windows project and can develop on a less powerful computer.
14
+
The benefit of using NuGet packages is that you get improved compilation times for your Windows project and can develop on a less powerful computer. This will also translate into a smoother update experience for newer versions of `react-native-windows`.
15
15
16
-
The other benefit will be that it will be easier to update your projects to future versions of `react-native-windows`.
16
+
> **Note on new projects:** Building from source will remain the default for new Old Architecture projects. This is because there are known compatibility issues with [community modules](supported-community-modules.md), as they often still rely on building the shared code from source, making the parallel use of NuGets problematic.
17
17
18
-
# How to enable on new projects
19
-
When creating a new project in [Get Started with Windows](getting-started.md), the templates used by the [init-windows command](init-windows-cli.md) default to building against source. Follow the instructions below if you wish to try using the NuGet packages.
20
-
21
-
> Note: The formerly recommended [React Native Windows Init CLI](https://microsoft.github.io/react-native-windows/init-cli) still supports an `--experimentalNuGetDependency true` flag to set up a new project which uses the NuGet packages, but as that command is planned for deprecation, it's not recommended.
22
-
23
-
# How to update a previously created project
24
-
The steps below will help you modify your RNW project so you can consume the RNW NuGet packages.
25
-
26
-
> Note: If you're in the process of upgrading your app to a new version of RNW (See [Upgrading App to Latest Version of React Native Windows](upgrade-app.md)), and you've already set the `<UseExperimentalNuGet>true</UseExperimentalNuGet>` flag (as per below), the [init-windows command](init-windows-cli.md) will try to respect that setting so you shouldn't have to re-apply the manual steps below after the upgrade.
27
-
28
-
<!--DOCUSAURUS_CODE_TABS-->
29
-
<!--C# projects-->
30
-
1. Update the solution file `windows\<projectName>.sln`:
31
-
1. Open the project in Visual Studio
32
-
1. Remove all projects except your own app project
33
-
1. Edit the file `windows\ExperimentalFeatures.props`
34
-
1. Set the following to true
35
-
```xml
36
-
<UseExperimentalNuGet>true</UseExperimentalNuGet>
37
-
```
38
-
1. Edit the project file `windows\<projectName>\<projectName.csproj>`
39
-
1. Remove any `<ProjectReference>` or `<PackageReference>` references for `Microsoft.ReactNative.*` projects.
40
-
41
-
1. Update the C# logic for the new [compile-time C# codeGen](native-modules-csharp-codegen.md)
42
-
43
-
<!--C++ projects-->
44
-
> Note: Starting with version 0.68, React Native for Windows apps use `PackageReference`s for native `C++` NuGet dependencies. See [Managing C++ dependencies](managing-cpp-deps.md) about migrating away from use the older, `packages.config` for managing NuGet dependencies.
45
-
46
-
1. Update the solution file `windows\<projectName>.sln`:
47
-
1. Open the project in Visual Studio
48
-
1. Remove all projects that are not your project
49
-
1. Edit the file `windows\ExperimentalFeatures.props`
50
-
1. Set the following to true
51
-
```xml
52
-
<UseExperimentalNuGet>true</UseExperimentalNuGet>
53
-
```
54
-
1. Edit the project file `windows\<projectName>\<projectName.vcxproj>`
55
-
1. Remove any `<ProjectReference>` or `<PackageReference>` references for `Microsoft.ReactNative.*` projects.
56
-
57
-
<!--END_DOCUSAURUS_CODE_TABS-->
58
-
59
-
# Version match
60
-
The versions of the NuGet package in your project must match the npm package version. If you need to update the NuGet packages there is a separate page on [Updating NuGet packages](nuget-update.md)
18
+
> **Note on existing projects:** Previously exposed methods for building Old Architecture projects against NuGets were experimental and are being deprecated, and therefore should not be used. If you're in the process of upgrading an existing Old Architecture project that *did* use those experimental methods, the [init-windows command](init-windows-cli.md) will try to respect that setting until the methods are formally deprecated and removed.
Copy file name to clipboardExpand all lines: website/pages/en/init-cli.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ class InitCli extends React.Component {
20
20
React Native Windows Init CLI
21
21
</h1>
22
22
<p>
23
-
This guide will give you more information on the React Native Windows Init CLI.
23
+
This guide will give you more information on the React Native Windows Init CLI.<b>Note:</b> This command will only work for RNW <e; 0.75. If you are using RNW >e; 0.76, you should use the <ahref="/docs/init-windows"><code>init-windows</code> command</a> instead.
0 commit comments