Welcome to the OpenSilver CLI Templates! This NuGet package provides a set of templates for creating OpenSilver applications and libraries quickly and efficiently. With templates designed for applications, business applications (built on OpenRia), and class libraries across multiple languages (C#, VB, and F#), this package empowers developers to kickstart OpenSilver projects with the structure they need.
-
OpenSilver Application
- A standard OpenSilver application template to create web applications using the power of OpenSilver and .NET. Supports C#, VB, and F#.
-
OpenSilver Business Application
- A business-focused template that leverages OpenRia (ported to OpenSilver), ideal for enterprise-level applications needing robust data management and communication. Supports C# and VB.
-
OpenSilver Class Library
- Class libraries in C#, VB, and F# to support modularity and reusability in OpenSilver applications.
Each template is designed to help developers focus on building applications by providing a clear, pre-configured structure that works out of the box with OpenSilver.
To install the CLI templates, use the following command:
dotnet new install OpenSilver.TemplatesOnce installed, you can use dotnet new commands to create new projects from these templates.
To create an OpenSilver Application, specify the language or let C# be the default:
dotnet new opensilverapp -n MyOpenSilverAppFor a Business Application (using OpenRia):
dotnet new opensilverbusinessapp -n MyOpenSilverBusinessAppTo create a Class Library, choose the language-specific template or default to C#:
dotnet new opensilverlib -lang C# -n MyOpenSilverClassLibraryAlternatively, for VB or F#, replace C# with VB or F# in the -lang parameter.
These commands will generate a new project folder with the specified name, template structure, and language.
| Template | Short Name | Language(s) Supported | Default Language |
|---|---|---|---|
| OpenSilver Application | opensilverapp | C#, VB, F# | C# |
| OpenSilver Business App | opensilverbusinessapp | C#, VB | C# |
| OpenSilver Class Library | opensilverlib | C#, VB, F# | C# |
For issues, please visit the OpenSilver repository and submit an issue. For more information on OpenSilver, visit the OpenSilver website.