From 0ac954abdbbbd5d1b664b457efe9b40507dd0e5c Mon Sep 17 00:00:00 2001 From: Glenn <5834289+glennawatson@users.noreply.github.com> Date: Sun, 31 Oct 2021 18:38:00 +1100 Subject: [PATCH] fix: uno winui csproj incorrectly configured (#2989) * fix: uno winui csproj incorrectly configured * Update ReactiveUI.Uno.WinUI.csproj * Fix * Update ReactiveUI.Uno.WinUI.csproj * Add back msbuild sdk extras * Further fixes --- .../ReactiveUI.Uno.WinUI.csproj | 49 ++++++++++++++----- .../ActivationForViewFetcher.cs | 5 ++ src/ReactiveUI.Uno/CoreDispatcherScheduler.cs | 5 ++ src/ReactiveUI.Uno/ReactiveUI.Uno.csproj | 2 +- 4 files changed, 48 insertions(+), 13 deletions(-) diff --git a/src/ReactiveUI.Uno.WinUI/ReactiveUI.Uno.WinUI.csproj b/src/ReactiveUI.Uno.WinUI/ReactiveUI.Uno.WinUI.csproj index 935cde7caf..f3a21430f1 100644 --- a/src/ReactiveUI.Uno.WinUI/ReactiveUI.Uno.WinUI.csproj +++ b/src/ReactiveUI.Uno.WinUI/ReactiveUI.Uno.WinUI.csproj @@ -1,19 +1,44 @@ - - + - $(DefineConstants);HAS_WINUI + netstandard20;MonoAndroid11.0;Xamarin.iOS10;Xamarin.Mac20;net6.0-android;net6.0-ios;net6.0-macos + ReactiveUI.Uno.WinUI + Contains the ReactiveUI platform specific extensions for Uno WinUI + $(DefineConstants);HAS_UNO;HAS_WINUI + $(NoWarn);SA1648;CA1816;CA1001;CS0108;CS0114;CS3021;CS1574;CA1303 + enable + preview + mvvm;reactiveui;rx;reactive extensions;observable;LINQ;events;frp;net;unoplatform;winui - - - - - netstandard20;MonoAndroid11.0;Xamarin.iOS10;Xamarin.Mac20;net6.0-android;net6.0-ios;net6.0-macos + + $(DefineConstants);WASM - + + + + + + + + + + + + + + + - - + + + + + + - + + + + + diff --git a/src/ReactiveUI.Uno/ActivationForViewFetcher.cs b/src/ReactiveUI.Uno/ActivationForViewFetcher.cs index 465aa81908..06c695d2fb 100644 --- a/src/ReactiveUI.Uno/ActivationForViewFetcher.cs +++ b/src/ReactiveUI.Uno/ActivationForViewFetcher.cs @@ -9,8 +9,13 @@ using System.Reactive.Linq; using System.Reflection; +#if HAS_UNO_WINUI +using Microsoft.UI.Xaml; +using Windows.Foundation; +#else using Windows.Foundation; using Windows.UI.Xaml; +#endif namespace ReactiveUI.Uno { diff --git a/src/ReactiveUI.Uno/CoreDispatcherScheduler.cs b/src/ReactiveUI.Uno/CoreDispatcherScheduler.cs index 9b20602fba..7ffbfa479f 100644 --- a/src/ReactiveUI.Uno/CoreDispatcherScheduler.cs +++ b/src/ReactiveUI.Uno/CoreDispatcherScheduler.cs @@ -9,8 +9,13 @@ using System.Runtime.ExceptionServices; using System.Threading; +#if HAS_UNO_WINUI +using Microsoft.UI.Xaml; +using Windows.UI.Core; +#else using Windows.UI.Core; using Windows.UI.Xaml; +#endif namespace System.Reactive.Concurrency { diff --git a/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj b/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj index e0f0f87204..4e932a5816 100644 --- a/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj +++ b/src/ReactiveUI.Uno/ReactiveUI.Uno.csproj @@ -22,7 +22,7 @@ - +