Adding Uno.WinUI.Lottie
to WinUI target causes build error
#13482
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, …)
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)
The text was updated successfully, but these errors were encountered: