Downloading and Installing
The best way to install ReactJS.NET is via NuGet. There are several NuGet packages available:
- React.Core - The core React library. Contains the main functionality of React and JSX. You will normally use this through an integration library like React.Mvc4.
- React.Web.Mvc4 - Integration with ASP.NET MVC 4 and 5.
- React.AspNet - Integration with ASP.NET Core. Learn more about ASP.NET 5 support
- System.Web.Optimization.React - Integration with ASP.NET Bundling and Minification.
These packages can be installed either via the UI in Visual Studio, or via the Package Manager Console:
Development builds are automatically built after every change. Use these if you want the very latest bleeding-edge version. These are located on a custom package server so you need to add this as a package source in Visual Studio:
- Click Tools → NuGet Package Manager → Package Manager Settings
- Click Package Sources
- Click the plus icon, enter name as "ReactJS.NET Dev" and URL as http://reactjs.net/packages/
- When adding the packages to your application, manually select "ReactJS.NET Dev" as the package source, and ensure "Include Prerelease" is enabled.
To build your own copy of ReactJS.NET (for example, if implementing a new feature or fixing a bug):
- Compile ReactJS.NET by running
- Reference React.dll and React.Mvc4.dll (if using MVC 4) in your Web Application project
Your first build always needs to be done using the build script (
this generates a few files required by the build (such as
SharedAssemblyVersionInfo.cs). Once this build is completed, you can open
React.sln in Visual Studio and compile directly from Visual Studio.