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

Make Uno.[Win]UI.<Lottie|DevServer> packages to work also on windows #14196

Closed
dr1rrb opened this issue Oct 31, 2023 · 10 comments
Closed

Make Uno.[Win]UI.<Lottie|DevServer> packages to work also on windows #14196

dr1rrb opened this issue Oct 31, 2023 · 10 comments
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers kind/enhancement New feature or request kind/papercut Issue that is especially relevant to users beginning to use Uno

Comments

@dr1rrb
Copy link
Member

dr1rrb commented Oct 31, 2023

What would you like to be added

We should add a _._ file and remove all dependencies on windows target.

Why is this needed

Adding a reference to this packages in the core "library project" (from our app template) will break the windows build. Reference has to be conditional to NOT windows.

For which platform

No response

Anything else we need to know?

Even if our app template does include those reference conditionally to NOT windows, any dev that would add those references later in their app development (or while updating an exciting project) will encounter some weird build error:

Lottie

The windows head project build will fail with

1>MyApp.Windows.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:\Users\David\.nuget\packages\microsoft.windowsappsdk\1.4.231008000\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(931,9): error MSB3030: Could not copy the file "obj\x64\Debug\net7.0-windows10.0.19041.0\win-x64\AppHead.xbf" because it was not found.

DevServer

When adding MainWindow.EnableHotReload();

error CS0012: The type 'Window' is defined in an assembly that is not referenced. You must add a reference to assembly 'Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'.
@dr1rrb dr1rrb added kind/enhancement New feature or request 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 31, 2023
@dr1rrb dr1rrb changed the title Make Uno.[Win]UI.[Lottie|DevServer] packages to work also on windows Make Uno.[Win]UI.<Lottie|DevServer> packages to work also on windows Oct 31, 2023
@MartinZikmund MartinZikmund added difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers kind/papercut Issue that is especially relevant to users beginning to use Uno 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 Nov 2, 2023
@LITTOMA
Copy link

LITTOMA commented Dec 30, 2023

Any updates on this issue? My Windows project is not built since updated to latest version of Uno.

@LITTOMA
Copy link

LITTOMA commented Jan 6, 2024

Hello?

@jeromelaban
Copy link
Member

@LITTOMA Can you provide more information about your issue? It's always best to provide logs, samples, etc...

@LITTOMA
Copy link

LITTOMA commented Jan 8, 2024

@jeromelaban It's exactly the same as what @dr1rrb mention in the post. The error output for me is like:

1>MyApp.Windows.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:\Users\David\.nuget\packages\microsoft.windowsappsdk\1.4.231008000\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(931,9): error MSB3030: Could not copy the file "obj\x64\Debug\net7.0-windows10.0.19041.0\win-x64\AppHead.xbf" because it was not found.

@jeromelaban
Copy link
Member

This is unfortunately not enough to troubleshoot your issue. If you have either Uno.WinUI.Lottie or Uno.WinUI.DevServer included in your .Windows project, try removing them.

@sasakrsmanovic
Copy link
Contributor

Hello @LITTOMA ; were you able to troubleshoot this further? We've love to action this but would love to get more information please.

@LITTOMA
Copy link

LITTOMA commented Feb 13, 2024

Hi @sasakrsmanovic . I tried to remove Uno.WinUI.Lottie package from the windows project. However another error occurs on build:
WMC1006 Cannot resolve Assembly or Windows Metadata file 'Type universe cannot resolve assembly: Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null.'

All packages I've installed:

<ItemGroup>
<PackageReference Include="Uno.Extensions.Http.WinUI" />
<PackageReference Include="Uno.WinUI" />
<PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
<PackageReference Include="CommunityToolkit.Mvvm" />
<PackageReference Include="Uno.Extensions.Configuration" />
<PackageReference Include="Uno.Extensions.Http" />
<PackageReference Include="Uno.Extensions.Http.Refit" />
<PackageReference Include="Uno.Extensions.Logging.WinUI" />
<PackageReference Include="Uno.Extensions.Logging.Serilog" />
<PackageReference Include="Uno.Extensions.Serialization.Http" />
<PackageReference Include="Uno.Extensions.Serialization.Refit" />
<PackageReference Include="Uno.Toolkit.WinUI" />
<PackageReference Include="Uno.Extensions.Hosting.WinUI" />
<PackageReference Include="Uno.Extensions.Localization.WinUI" />
<PackageReference Include="Uno.Extensions.Navigation.Toolkit.WinUI" />
<PackageReference Include="Uno.Extensions.Navigation.WinUI" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" />
<PackageReference Include="System.IO.Ports" />
</ItemGroup>

@jeromelaban
Copy link
Member

Thanks. Can you provide a binlog of your build? It will help troubleshoot further.

@xperiandri
Copy link
Contributor

I suppose it has already been fixed with Uno.Sdk

@jeromelaban
Copy link
Member

Yes, this has been fixed by the uno.sdk. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers kind/enhancement New feature or request kind/papercut Issue that is especially relevant to users beginning to use Uno
Projects
None yet
Development

No branches or pull requests

6 participants