Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Miscellaneous docs updates and improvements #19416

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions doc/articles/create-an-app-vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,21 @@ Creating an Uno Platform project is done [using dotnet new](xref:Uno.GetStarted.
> [!IMPORTANT]
> Apple targets are automatically disabled under Linux.

Next, open the project using Visual Studio Code:
Next, open the project using Visual Studio Code.

* In the terminal type the following:
* Let's assume your project is named `MyApp` and is located inside a `Projects` folder:

* **Using the Terminal**
Ensure you are at the **parent folder** (`Projects`) level, then run:

```bash
code ./MyApp
```

* **Using Visual Studio Code**
1. Open **Visual Studio Code**.
2. Go to **File > Open Folder**.
3. Navigate to the `Projects` folder and select the `MyApp` folder.
* Visual Studio Code might ask to restore the NuGet packages. Allow it to restore them if asked.
* Once the solution has been loaded, in the status bar at the bottom left of VS Code, `MyApp.sln` is selected by default. Select `MyApp.csproj` to load the project instead.

Expand Down
33 changes: 29 additions & 4 deletions doc/articles/features/working-with-xaml-hot-reload.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,39 @@ Here's a summary of the Hot Reload connection statuses and their corresponding i
### [**Common issues**](#tab/common-issues)

- If the Hot Reload Indicator is red and shows a connection failure, ensure that you have the [latest stable version](https://www.nuget.org/packages/Uno.Sdk/latest) of [Uno.SDK](xref:Uno.Features.Uno.Sdk) and the latest version of your IDE’s extension ([Visual Studio](https://aka.platform.uno/vs-extension-marketplace), [Visual Studio Code](https://aka.platform.uno/vscode-extension-marketplace), or [Rider](https://aka.platform.uno/rider-extension-marketplace)). Additionally, [re-run Uno.Check](xref:UnoCheck.UsingUnoCheck) to update dependencies, then relaunch your IDE, [sign in with your Uno Platform account](xref:Uno.GetStarted.Licensing), and rebuild your application.

For existing applications, refer to our [migration guide](xref:Uno.Development.MigratingFromPreviousReleases) for upgrade steps.
> [!IMPORTANT]
> When upgrading to **Uno.Sdk 5.5 or higher**, the `EnableHotReload()` method in `App.xaml.cs` is deprecated and should be replaced with `UseStudio()`.
- Observe the application logs, you should see diagnostics messages in the app when a XAML file is reloaded.
- WinAppSDK on Windows-specific issues
- Grid Succinct syntax [is not supported](https://github.com/microsoft/microsoft-ui-xaml/issues/7043#issuecomment-1120061686)
- You can troubleshoot Hot Reload further from the DevServer client running in the app by:
- Setting `builder.SetMinimumLevel(LogLevel.Information)` to `LogLevel.Debug` or `Trace`
- Setting `builder.AddFilter("Uno.UI.RemoteControl", LogLevel.Debug )` to `LogLevel.Debug` or `Trace`
- You can troubleshoot **Hot Reload** further by adjusting the **logging level** in your app.

- **For Blank App Preset** (in `App.xaml.cs`, inside `InitializeLogging`):

```csharp
// Adjust logging level
builder.SetMinimumLevel(LogLevel.Debug); // or LogLevel.Trace

// Uncomment and adjust logging level
builder.AddFilter("Uno.UI.RemoteControl", LogLevel.Debug); // or LogLevel.Trace
```

- **For Recommended App Preset** (in `App.xaml.cs`, inside `UseLogging`):

```csharp
// Adjust logging level
logBuilder.SetMinimumLevel(LogLevel.Debug); // or LogLevel.Trace

// Uncomment and adjust logging level
logBuilder.HotReloadCoreLogLevel(LogLevel.Debug); // or LogLevel.Trace
```

The diagnostic messages will appear in the app's **Debug Output**.

If you need to share logs when opening an issue on the GitHub [Uno Platform repository](https://github.com/unoplatform/uno), it is recommended to set `LogLevel` to **Trace** to provide the most detailed logs for investigation.

The diagnostics messages will appear in the app's debug output.
- If you're getting `ENC0003: Updating 'attribute' requires restarting the application`, add the following in the `Directory.Build.props` (or in each .csproj project head):

```xml
Expand Down