# NuGet packages

WebSharper uses NuGet packages to ship the core tools (the F#/C# to JS compilers, build automation, etc.) - often just referred to as WebSharper, proxies for the F# standard library and other .NET libraries, and bindings (also called "extensions") to JavaScript libraries. This makes it easy and predictable to add or update various WebSharper components in your applications.

# Configuring the WebSharper developer feed

WebSharper and its components are available on NuGet.org. In addition, if you would also like to access the latest developer packages, you can find them on the WebSharper GitHub packages feed at https://nuget.pkg.github.com/dotnet-websharper/index.json:

> dotnet nuget list source
Registered Sources:
  1.  nuget.org [Enabled]
  2.  dotnet-websharper-GitHub [Enabled]

The standard NuGet feed should come configured on your system when installing the .NET SDK. If you want to configure the WebSharper GitHub feed as well, you can do so as follows:

dotnet nuget add source https://nuget.pkg.github.com/dotnet-websharper/index.json --name dotnet-websharper-GitHub --username <GH_USER> --password <PAT>

where GH_USER is your GitHub username, and PAT is your Personal Access Token (PAT) for your GitHub account.

If your project uses Paket, you will need to configure the above GitHub feed for Paket as well:

paket config add-credentials https://nuget.pkg.github.com/dotnet-websharper/index.json --username <GH-USER> --password <PAT>

# Core NuGet packages

Below are some of the WebSharper NuGet packages that you will be working with:

Package name What does it provide?
The core package for any WebSharper project. Includes proxies for the F# standard library, the core JavaScript bindings for DOM, EcmaScript, etc., the sitelets runtime with remoting and static server-side content generation, and the WebSharper Interface Generator (WIG) for creating your own JavaScript bindings. Reference it in any WebSharper project/library, along with WebSharper.FSharp or WebSharper.CSharp, depending on your source language.
msbuild targets/build automation to light up WebSharper features, including the main F# to JavaScript compiler.
Same as WebSharper.FSharp, except for C#.
Helpers to use WebSharper from an ASP.NET Core project. You only usually need it for your web projects, not libraries (unless the library builds on some ANC functionality.)
A charting library with a similar API to FSharp.Charting and configurable renderers.
A reactive forms library built on top of WebSharper.UI, with support for declarative, composable web forms with retargetable rendering.
A highly performant, reactive UI library with type-safe templating. The recommended way to deal with reactive HTML.
A client-side testing framework for WebSharper.
The WebSharper project templates for F# and C#.

# Compiler packages

For more advanced use cases, where you need custom JavaScript compilation, you can use the following packages:

Package name What does it provide?
Core WebSharper compiler utilities shared by the F# and C# to JavaScript compilers, including offline sitelet generation.
The F# to JavaScript compiler. Depends on WebSharper.Compiler.Common and FSharp.Compiler.Services.
The C# to JavaScript compiler. Depends on WebSharper.Compiler.Common and Microsoft.CodeAnalysis.CSharp (a.k.a. Roslyn).
Includes both WebSharper.Compiler.FSharp and WebSharper.Compiler.CSharp.