There are several ways to get 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.
Simply add the latest WebSharper.CSharp or WebSharper.FSharp (depending on your language) and a wsconfig.json configuration file.
Using 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:
To update the templates to the latest version, you can use:
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:
The SPA template creates an ASP.NET Core-hosted Single-Page Application. Create it with:
The Library template creates a simple class library compiled with WebSharper. Create it with:
The HTML template creates a statically-generated website. Create it with:
Using Visual Studio
The WebSharper Visual Studio templates can be used to create .NET 4.x or ASP.NET Core-based projects.
The WebSharper project templates are available in the New Project window under "Visual C# / WebSharper" and "Visual F# / WebSharper".
Where to go next?
Learn how to use WebSharper:
- Discover the server-side functionality: serving content, defining an HTTP API, using JSON, etc.
- Learn about reactive applications: using HTML templates, adding dynamic behavior, handling client-side state, etc.
Engage with the community:
© 2009-2018 WebSharper
Latest version is 184.108.40.206