Skip to content

Commit ca034db

Browse files
authored
Merge pull request #549 from AvaloniaUI/maxkatz6-patch-2
Update dotnet-publish output path
2 parents 4541358 + 2ae2581 commit ca034db

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

docs/guides/platforms/how-to-use-web-assembly.md

+18-11
Original file line numberDiff line numberDiff line change
@@ -46,33 +46,40 @@ cd BrowserTest.Browser
4646
dotnet run
4747

4848
# Output:
49-
# App url: http://localhost:5000/index.html
50-
# App url: https://localhost:5001/index.html
49+
# App url: http://127.0.0.1:53576/
50+
# App url: https://127.0.0.1:53577/
51+
# Debug at url: http://127.0.0.1:53576/_framework/debug
52+
# Debug at url: https://127.0.0.1:53577/_framework/debug
5153
```
5254

53-
5455
### Deployment
5556
In the `BrowserTest.Browser` directory, run:
5657
```bash
5758
dotnet publish
58-
59-
# ... (build output)
60-
# Generated app bundle at .../bin/Release/net8.0/browser-wasm/AppBundle/
6159
```
62-
Now you can serve your app from the `bin/Release/net8.0/browser-wasm/AppBundle` folder (for .NET 8.0, for example) using your favorite web server (such as Azure Static Web Apps).
6360

64-
> **Beware:**
61+
After project was published, .NET SDK creates an app bundle directory with `index.html` file and compiled application files.
62+
With latest .NET 8 SDK, this directory is located at `bin/Release/net8.0-browser/browser-wasm/publish`.
63+
Now you can serve your app from this directory using your favorite web server (such as Azure Static Web Apps).
64+
65+
:::note
66+
On older .NET SDK versions, app bundle was located in different directory: `bin/Release/net8.0-browser/browser-wasm/AppBundle` (search for `AppBundle`).
67+
:::
68+
69+
:::warning
6570
Currently using `dotnet publish` with the `-o` or `--output` flag does not produce the AppBundle folder in the output directory. (See [this issue](https://github.com/dotnet/runtime/issues/94319).) You'll still have to grab it out of the `bin` directory at the path specified by the publish output.
71+
:::
6672

6773
#### Testing AppBundle locally
68-
You can serve your wasm app from the AppBundle directly using the [dotnet-serve](https://github.com/natemcmaster/dotnet-serve) tool as follows:
74+
75+
You can serve your wasm app from this directly using the [dotnet-serve](https://github.com/natemcmaster/dotnet-serve) tool as follows:
6976
```bash
7077
dotnet tool install --global dotnet-serve
7178

72-
dotnet serve -d:bin/Release/net8.0/browser-wasm/AppBundle
79+
dotnet serve -d:bin/Release/net8.0-browser/browser-wasm/publish
7380

7481
# Output:
75-
# Starting server, serving bin/Release/net8.0/browser-wasm/AppBundle
82+
# Starting server, serving bin/Release/net8.0-browser/browser-wasm/publish
7683
# Listening on any IP:
7784
# http://localhost:49875
7885
```

0 commit comments

Comments
 (0)