Skip to content

Commit

Permalink
fix: document uno.ui/uno.winui conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Jan 18, 2023
1 parent 2dc18e0 commit 8423f0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build/uno.winui.common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@

<Target Name="ValidateUnoUIAndUnoWinUIExclusion" BeforeTargets="BeforeBuild">
<Error Code="UNOB0001"
Text="Cannot build with both Uno.WinUI and Uno.UI nuget packages referenced."
Condition="'$(PkgUno_UI)'!='' and '$(PkgUno_WinUI)'!=''" />
HelpLink="https://aka.platform.uno/UNOB0001"
Text="Cannot build with both Uno.WinUI and Uno.UI nuget packages referenced. https://aka.platform.uno/UNOB0001"
Condition="'$(PkgUno_UI)'!='' and '$(PkgUno_WinUI)'!=''" />
</Target>

<Import Project="$(SourceGeneratorBasePath)Uno.UI.SourceGenerators.props" />
Expand Down
9 changes: 9 additions & 0 deletions doc/articles/get-started-wizard.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ Event handlers [cannot be automatically](https://github.com/unoplatform/uno/issu

A workaround is to use the [`x:Bind` to events feature](features/windows-ui-xaml-xbind.md#examples). This feature allows to use a simpler syntax like `<Button Click="{x:Bind MyClick}" />` and declare a simple method `private void MyClick() { }` in the code-behind.

### Cannot build with both Uno.WinUI and Uno.UI NuGet packages referenced

This issue generally happens when referencing a Uno.UI (using UWP APIs) NuGet package in an application that uses Uno.WinUI (Using WinAppSDK APIs).

For instance, if your application has `<PackageReference Include="Uno.WinUI"` in the `csproj` files, this means that you'll need to reference WinUI versions of NuGet packages.

For instance:
- `Uno.UI` -> `Uno.WinUI`

#### Build error `Failed to generate AOT layout`

When building for WebAssembly with AOT mode enabled, the following error may appear:
Expand Down

0 comments on commit 8423f0a

Please sign in to comment.