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

Adding Uno.WinUI.Lottie to WinUI target causes build error #13482

Closed
nickrandolph opened this issue Sep 1, 2023 · 3 comments
Closed

Adding Uno.WinUI.Lottie to WinUI target causes build error #13482

nickrandolph opened this issue Sep 1, 2023 · 3 comments
Labels
difficulty/medium 🤔 Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI kind/bug Something isn't working project/media 📺 Categorizes an issue or PR as relevant to media (MediaPlayer, WebView, PDF, Image, …)

Comments

@nickrandolph
Copy link
Contributor

Current behavior

Create a new Uno app using the blank template (eg dotnet new unoapp -preset blank -o LottieTestApp) and then move the Lottie package reference in the class library so that it applies to all targets (by default it's in the non-winui block). Build the class library raises the following exception:

1>C:\temp\extdev\LottieTestApp\LottieTestApp\LottieTestApp.csproj : XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'Type universe cannot resolve assembly: Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null.'
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5167,5): error MSB3030: Could not copy the file "C:\temp\extdev\LottieTestApp\LottieTestApp\obj\Debug\net7.0-windows10.0.19041\MainPage.xbf" because it was not found.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5167,5): error MSB3030: Could not copy the file "C:\temp\extdev\LottieTestApp\LottieTestApp\obj\Debug\net7.0-windows10.0.19041\AppResources.xaml" because it was not found.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5167,5): error MSB3030: Could not copy the file "C:\temp\extdev\LottieTestApp\LottieTestApp\obj\Debug\net7.0-windows10.0.19041\AppResources.xbf" because it was not found.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5167,5): error MSB3030: Could not copy the file "C:\temp\extdev\LottieTestApp\LottieTestApp\obj\Debug\net7.0-windows10.0.19041\MainPage.xaml" because it was not found.
1>Done building project "LottieTestApp.csproj" -- FAILED.

Expected behavior

Uno.WinUI.Lottie should be referenced by any Uno target without it causing build errors

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

No response

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

Suggestion would be to add an empty entry for WinUI so that the winui target doesn't pick up the net7 library (and hence an invalid reference to to Uno.WinUI)

@nickrandolph nickrandolph added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Sep 1, 2023
@jeromelaban
Copy link
Member

Adding an empty entry will not be enough, because it will not be specific enough to exclude only WinAppSDK (wpf and winappsdk both use net7.0-windows).

We would need to add a targets file that excludes the references from the package based on something like

<_UnoIsWinAppSDKDefined Condition="'$(WindowsAppSDKWinUI)'=='true' or '$(UseWinUITools)'=='true'">true</_UnoIsWinAppSDKDefined>
. which it fragile in itself.

@MartinZikmund MartinZikmund changed the title Adding Uno.WinUI.Lottie to WinUI target causes build error Adding Uno.WinUI.Lottie to WinUI target causes build error Oct 25, 2023
@MartinZikmund MartinZikmund added project/media 📺 Categorizes an issue or PR as relevant to media (MediaPlayer, WebView, PDF, Image, …) difficulty/medium 🤔 Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI and removed triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Oct 25, 2023
@xperiandri
Copy link
Contributor

Is it still an issue? I suppose it can be closed

@jeromelaban
Copy link
Member

It's indeed not needed anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/medium 🤔 Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI kind/bug Something isn't working project/media 📺 Categorizes an issue or PR as relevant to media (MediaPlayer, WebView, PDF, Image, …)
Projects
None yet
Development

No branches or pull requests

4 participants