File tree Expand file tree Collapse file tree 1 file changed +62
-0
lines changed
src/mono/wasm/templates/templates/browser Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ # WebAssembly Browser App Template
2+
3+ This template creates a .NET app that runs on WebAssembly in a browser.
4+
5+ ## Template Options
6+
7+ ### UseMonoRuntime
8+
9+ ** Parameter:** ` --UseMonoRuntime `
10+ ** Type:** boolean
11+ ** Default:** ` true `
12+
13+ Determines whether to use the Mono runtime for WebAssembly.
14+
15+ When set to ` true ` , the generated project file will include:
16+ ``` xml
17+ <UseMonoRuntime >true</UseMonoRuntime >
18+ ```
19+
20+ #### Usage Examples
21+
22+ Create a project with Mono runtime (default):
23+ ``` bash
24+ dotnet new wasmbrowser -n MyApp
25+ ```
26+
27+ Or explicitly specify:
28+ ``` bash
29+ dotnet new wasmbrowser -n MyApp --UseMonoRuntime true
30+ ```
31+
32+ Create a project without the Mono runtime property:
33+ ``` bash
34+ dotnet new wasmbrowser -n MyApp --UseMonoRuntime false
35+ ```
36+
37+ ## Getting Started
38+
39+ After creating your project:
40+
41+ 1 . Navigate to your project directory:
42+ ``` bash
43+ cd MyApp
44+ ```
45+
46+ 2 . Run the application:
47+ ``` bash
48+ dotnet run
49+ ```
50+
51+ 3 . Open your browser to the URL displayed in the console output (typically ` https://localhost:7000 ` or ` http://localhost:5000 ` ).
52+
53+ ## Project Structure
54+
55+ - ** Program.cs** - The entry point of your application
56+ - ** wwwroot/** - Static web assets (HTML, CSS, JavaScript)
57+ - ** Properties/** - Project properties and configuration
58+
59+ ## Learn More
60+
61+ - [ .NET WebAssembly Documentation] ( https://learn.microsoft.com/en-us/aspnet/core/blazor/webassembly )
62+ - [ Mono Runtime] ( https://www.mono-project.com/ )
You can’t perform that action at this time.
0 commit comments