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

Referencing System.Reactive fails the build #11829

Closed
jeromelaban opened this issue Mar 28, 2023 · 6 comments
Closed

Referencing System.Reactive fails the build #11829

jeromelaban opened this issue Mar 28, 2023 · 6 comments
Assignees
Labels
area/external Categorizes an issue or PR as being external to the Uno kind/bug Something isn't working project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools

Comments

@jeromelaban
Copy link
Member

I require System.Reactive v5.0.0 in my project, I added the nuget package in my "VewiModels" library and now I get this build error:

1>C:\Program Files\dotnet\sdk\7.0.200\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(448,5): error NETSDK1082: There was no runtime pack for Microsoft.WindowsDesktop.App available for the specified RuntimeIdentifier 'win10-arm'.
1>C:\Program Files\dotnet\sdk\7.0.200\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(448,5): error NETSDK1082: There was no runtime pack for Microsoft.WindowsDesktop.App available for the specified RuntimeIdentifier 'win10-arm-aot'.

I found that adding

<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
@jeromelaban jeromelaban added kind/bug Something isn't working project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools labels Mar 28, 2023
@Youssef1313
Copy link
Member

I wasn't able to reproduce. If there is a repro project, it would be good to start investigating.

@Youssef1313
Copy link
Member

Youssef1313 commented Mar 29, 2023

Note: This issue is only reproducible with net5.0-windows10.0.19041 and later. I was using 18362 so that's why I couldn't reproduce earlier.

The problem with System.Reactive is that it brings Microsoft.WindowsDesktop.App framework reference for net5.0-windows10.0.19041

The default runtime identifiers for WinUI are: https://github.com/microsoft/WindowsAppSDK/blob/ccc85853cd9d8305194ce0330ad384b5899752d7/dev/MRTCore/packaging/MrtCore.PriGen.targets#L122

and the supported runtime identifiers for Microsoft.WindowsDesktop.App are:

https://github.com/dotnet/installer/blob/0b8f0187eb580aede7dafcb5812e30884150d746/src/redist/targets/GenerateBundledVersions.targets#L271-L274

A possible workaround is to add <DisableTransitiveFrameworkReferences>true</DisableTransitiveFrameworkReferences> to csproj.

@Youssef1313 Youssef1313 added the area/external Categorizes an issue or PR as being external to the Uno label Mar 29, 2023
@igiona
Copy link
Contributor

igiona commented Mar 29, 2023

DisableTransitiveFrameworkReferences>true

The mentioned workaround works well for me 👍
Thanks for sharing!

I definitely prefer it above this other one I found:
<RuntimeIdentifiers Condition="'$(TargetFramework)'=='net7.0-windows10.0.19041'">win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>

@Youssef1313
Copy link
Member

Happy it worked!
Yes it should be safer than changing RuntimeIdentifiers.

Given that:

  • this is not an Uno bug, but something System.Reactive team should fix on their end (and they are already aware of the issue)
  • there is a working workaround

I'm going to close this issue.

@igiona
Copy link
Contributor

igiona commented Mar 30, 2023

@Youssef1313 are you aware of a public issue at System.Reactive that can be tracked?

@Youssef1313
Copy link
Member

Youssef1313 commented Mar 30, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/external Categorizes an issue or PR as being external to the Uno kind/bug Something isn't working project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools
Projects
None yet
Development

No branches or pull requests

3 participants