Skip to content

Commit 0a0e10c

Browse files
authored
Merge pull request #19413 from ajpinedam/dev/ajpm/improve.docs.for.implicit.packages
docs: improve Uno.SDK package version override
2 parents 3c3c6be + 5300cad commit 0a0e10c

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

doc/articles/features/using-the-uno-sdk.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,46 @@ Here are the supported properties:
131131

132132
Those properties can be set from `Directory.Build.props` or may be set in the `csproj` file for your project.
133133

134-
If you wish to disable Implicit package usage, add `<DisableImplicitUnoPackages>true</DisableImplicitUnoPackages>` to your `Directory.Build.props` file or `csproj` file. You will be then able to manually add the NuGet packages for your project.
134+
```xml
135+
<!-- .csproj file -->
136+
<Project Sdk="Uno.Sdk">
137+
<PropertyGroup>
138+
139+
...
140+
141+
<UnoFeatures>
142+
Material;
143+
Dsp;
144+
Hosting;
145+
Toolkit;
146+
Logging;
147+
MVUX;
148+
Configuration;
149+
Http;
150+
Serialization;
151+
Localization;
152+
Navigation;
153+
ThemeService;
154+
Mvvm;
155+
</UnoFeatures>
156+
<UnoToolkitVersion>6.3.6</UnoToolkitVersion>
157+
<MicrosoftLoggingVersion>9.0.1</MicrosoftLoggingVersion>
158+
<CommunityToolkitMvvmVersion>8.4.0</CommunityToolkitMvvmVersion>
159+
</PropertyGroup>
160+
</Project>
161+
```
162+
163+
In the sample above, we are overriding the default versions of the `UnoToolkit`, `MicrosoftLogging`, and `CommunityToolkitMvvm` packages.
164+
165+
## Disabling Implicit Uno Packages
166+
167+
If you wish to disable Implicit package usage, add the following:
168+
169+
```xml
170+
<DisableImplicitUnoPackages>true</DisableImplicitUnoPackages>
171+
```
172+
173+
to your `Directory.Build.props` file or `csproj` file. You will be then able to manually add the NuGet packages for your project.
135174

136175
> [!NOTE]
137176
> When disabling Implicit Uno Packages it is recommended that you use the `$(UnoVersion)` to set the version of the core Uno packages that are versioned with the SDK as the SDK requires `Uno.WinUI` to be the same version as the SDK to ensure proper compatibility.

0 commit comments

Comments
 (0)