Downloads

Create your WebSharper project quickly.


Getting Started with WebSharper

  • The simplest way is to use the dotnet CLI.
  • If you are using Windows, you can also install the Visual Studio extension.
  • The above options provide project templates to get you started quickly. You can also use WebSharper by simply adding it to an existing project with NuGet and a wsconfig.json configuration file.
    $ dotnet add package WebSharper.FSharp
    or
    $ dotnet add package WebSharper.CSharp

WebSharper also has many bindings for popular JavaScript libraries. Download them from NuGet.

Using WebSharper with the dotnet CLI

The WebSharper dotnet templates can be used to create ASP.NET Core-based projects.

Install the WebSharper project templates

To install the WebSharper project templates, use the following command:

$ dotnet new install WebSharper.Templates

To update the templates to the latest version, you can use:

$ dotnet new install "WebSharper.Templates::*"

Create a new WebSharper project

You can create multiple types of project, both in C# and F#.

  • The Web template creates an ASP.NET Core-hosted WebSharper application with both server-side and client-side code. Create it with:

    $ dotnet new websharper-web -lang f# -n ClientServer
  • The SPA template creates an ASP.NET Core-hosted Single-Page Application. Create it with:

    $ dotnet new websharper-spa -lang f# -n SPA
  • The Library template creates a simple class library compiled with WebSharper. Create it with:

    $ dotnet new websharper-lib -lang f# -n Library
  • The HTML template creates a statically-generated website. Create it with:

    $ dotnet new websharper-html -lang f# -n Offline

Where to go next?

Learn how to use WebSharper:

Happy Coding!