From 7b8289e11d3a5f3a24a721295f3696952cb9572b Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Tue, 3 Dec 2019 18:18:07 -0800 Subject: [PATCH 01/21] Initial port to WinUI3. --- .gitignore | 4 ++-- Directory.Build.props | 22 +++---------------- Directory.Build.targets | 2 +- .../LoginButton/LoginButton.Properties.cs | 2 +- .../Controls/LoginButton/LoginButton.cs | 6 ++--- .../PeoplePicker/PeoplePicker.Properties.cs | 2 +- .../Controls/PeoplePicker/PeoplePicker.cs | 4 ++-- .../PersonView/PersonView.Properties.cs | 4 ++-- .../Controls/PersonView/PersonView.cs | 6 ++--- .../Converters/UserToPersonConverter.cs | 2 +- .../Microsoft.Toolkit.Graph.Controls.csproj | 12 +++++++--- .../CommonProviderBehaviorBase.Properties.cs | 2 +- .../Providers/CommonProviderBehaviorBase.cs | 2 +- .../Providers/MockProviderBehavior.cs | 2 +- .../Microsoft.Toolkit.Graph.csproj | 6 ++--- SampleTest/App.xaml.cs | 14 ++++++------ SampleTest/MainPage.xaml.cs | 2 +- SampleTest/SampleTest.csproj | 7 +++++- .../UWP-XamlApplication/App.xaml.cs | 14 ++++++------ .../UWP-XamlApplication/SamplePage.xaml.cs | 14 ++++++------ build/build.cake | 10 ++++----- build/tools/packages.config | 4 ++++ global.json | 2 +- 23 files changed, 72 insertions(+), 73 deletions(-) create mode 100644 build/tools/packages.config diff --git a/.gitignore b/.gitignore index fa76b1f..cccd39e 100644 --- a/.gitignore +++ b/.gitignore @@ -300,8 +300,8 @@ __pycache__/ *.pyc # Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config +/build/tools/** +!/build/tools/packages.config # Tabs Studio *.tss diff --git a/Directory.Build.props b/Directory.Build.props index a011773..19de810 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -13,16 +13,15 @@ en-US $(MSBuildProjectName.Contains('.Design')) $(MSBuildProjectName.Contains('Test')) - $(MSBuildProjectName.Contains('Uwp')) $(MSBuildProjectName.Contains('Sample')) $(MSBuildProjectName.Contains('Wpf')) - 17763 - 16299 + 18362 + 17134 $(MSBuildThisFileDirectory)bin\nupkg - true + true $(MSBuildThisFileDirectory)toolkit.snk @@ -34,14 +33,6 @@ - - - - true - - - - @@ -75,13 +66,6 @@ - - - - - $(NoWarn);8002 - - diff --git a/Directory.Build.targets b/Directory.Build.targets index ced73e0..52bf508 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,6 +1,6 @@ - + 10.0.$(DefaultTargetPlatformVersion).0 diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.Properties.cs b/Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.Properties.cs index c9e2e97..08a3bb7 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.Properties.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.Properties.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.Graph; -using Windows.UI.Xaml; +using Microsoft.UI.Xaml; namespace Microsoft.Toolkit.Graph.Controls { diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.cs b/Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.cs index 369b9c0..142737a 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/LoginButton/LoginButton.cs @@ -7,9 +7,9 @@ using System.Threading.Tasks; using Microsoft.Graph.Auth; using Microsoft.Toolkit.Graph.Providers; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; namespace Microsoft.Toolkit.Graph.Controls { diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.Properties.cs b/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.Properties.cs index 1fd4bbe..df4de5f 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.Properties.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.Properties.cs @@ -5,7 +5,7 @@ using System.Collections.ObjectModel; using Microsoft.Graph; using Microsoft.Toolkit.Uwp.UI.Controls; -using Windows.UI.Xaml; +using Microsoft.UI.Xaml; namespace Microsoft.Toolkit.Graph.Controls { diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.cs b/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.cs index 03f2472..704222d 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.cs @@ -9,8 +9,8 @@ using Microsoft.Toolkit.Graph.Providers; using Microsoft.Toolkit.Uwp.UI.Controls; using Microsoft.Toolkit.Uwp.UI.Extensions; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; namespace Microsoft.Toolkit.Graph.Controls { diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.Properties.cs b/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.Properties.cs index 84fdbed..6827544 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.Properties.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.Properties.cs @@ -8,8 +8,8 @@ using System.Text; using System.Threading.Tasks; using Microsoft.Graph; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Media.Imaging; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media.Imaging; namespace Microsoft.Toolkit.Graph.Controls { diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.cs b/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.cs index f3bbdc5..7641c5e 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/PersonView/PersonView.cs @@ -9,9 +9,9 @@ using Microsoft.Graph; using Microsoft.Toolkit.Graph.Extensions; using Microsoft.Toolkit.Graph.Providers; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Media.Imaging; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media.Imaging; namespace Microsoft.Toolkit.Graph.Controls { diff --git a/Microsoft.Toolkit.Graph.Controls/Converters/UserToPersonConverter.cs b/Microsoft.Toolkit.Graph.Controls/Converters/UserToPersonConverter.cs index 965c61b..976bcaa 100644 --- a/Microsoft.Toolkit.Graph.Controls/Converters/UserToPersonConverter.cs +++ b/Microsoft.Toolkit.Graph.Controls/Converters/UserToPersonConverter.cs @@ -5,7 +5,7 @@ using System; using Microsoft.Graph; using Microsoft.Toolkit.Graph.Extensions; -using Windows.UI.Xaml.Data; +using Microsoft.UI.Xaml.Data; namespace Microsoft.Toolkit.Graph.Converters { diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index a9202d1..35cea03 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -1,7 +1,7 @@  - uap10.0.16299 + uap10.0.17134 Windows Community Toolkit Graph Controls Microsoft.Toolkit.Graph.Controls @@ -17,6 +17,9 @@ true Debug;Release;CI AnyCPU;ARM;ARM64;x64;x86 + $(NoWarn);CS8002;CS8305 + true + WinUI-Alpha-Projects-Don-t-Use-SDK-Xaml-Tools @@ -24,9 +27,12 @@ - - + + + + 3.0.0-alpha.191101.0 + diff --git a/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderBehaviorBase.Properties.cs b/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderBehaviorBase.Properties.cs index e957366..aacf255 100644 --- a/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderBehaviorBase.Properties.cs +++ b/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderBehaviorBase.Properties.cs @@ -5,7 +5,7 @@ #if DOTNET using System.Windows; #else -using Windows.UI.Xaml; +using Microsoft.UI.Xaml; #endif #if DOTNET diff --git a/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderBehaviorBase.cs b/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderBehaviorBase.cs index bf8bd86..b694d06 100644 --- a/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderBehaviorBase.cs +++ b/Microsoft.Toolkit.Graph.Controls/Providers/CommonProviderBehaviorBase.cs @@ -7,7 +7,7 @@ using Microsoft.Toolkit.Wpf.UI.Behaviors; #else using Microsoft.Toolkit.Uwp.UI.Behaviors; -using Windows.UI.Xaml; +using Microsoft.UI.Xaml; #endif #if DOTNET diff --git a/Microsoft.Toolkit.Graph.Controls/Providers/MockProviderBehavior.cs b/Microsoft.Toolkit.Graph.Controls/Providers/MockProviderBehavior.cs index 089b6c7..06e502b 100644 --- a/Microsoft.Toolkit.Graph.Controls/Providers/MockProviderBehavior.cs +++ b/Microsoft.Toolkit.Graph.Controls/Providers/MockProviderBehavior.cs @@ -9,7 +9,7 @@ using Microsoft.Toolkit.Graph.Providers; #else using System.Linq; -using Windows.UI.Xaml; +using Microsoft.UI.Xaml; #endif #if DOTNET diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index 8754ac8..43b0c99 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -1,7 +1,7 @@  - uap10.0.16299;netstandard2.0 + uap10.0.17134;netstandard2.0 Windows Community Toolkit .NET Standard Graph Services This package includes .NET Standard code helpers such as: @@ -16,13 +16,13 @@ AnyCPU;ARM;ARM64;x64;x86 - + $(DefineConstants);WINRT - + diff --git a/SampleTest/App.xaml.cs b/SampleTest/App.xaml.cs index cf46cb5..79a0f04 100644 --- a/SampleTest/App.xaml.cs +++ b/SampleTest/App.xaml.cs @@ -11,13 +11,13 @@ using Windows.ApplicationModel.Activation; using Windows.Foundation; using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; namespace SampleTest { diff --git a/SampleTest/MainPage.xaml.cs b/SampleTest/MainPage.xaml.cs index 2689205..33a202e 100644 --- a/SampleTest/MainPage.xaml.cs +++ b/SampleTest/MainPage.xaml.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Windows.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls; namespace SampleTest { diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj index 6439a8b..97ce4cf 100644 --- a/SampleTest/SampleTest.csproj +++ b/SampleTest/SampleTest.csproj @@ -12,12 +12,14 @@ en-US UAP 10.0.18362.0 - 10.0.16299.0 + 10.0.17134.0 14 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} true false + true + WinUI-Alpha-Projects-Don-t-Use-SDK-Xaml-Tools true @@ -153,6 +155,9 @@ 6.2.9 + + 3.0.0-alpha.191101.0 + diff --git a/Samples/XAML Islands/UWP-XamlApplication/App.xaml.cs b/Samples/XAML Islands/UWP-XamlApplication/App.xaml.cs index b579caf..6e4786e 100644 --- a/Samples/XAML Islands/UWP-XamlApplication/App.xaml.cs +++ b/Samples/XAML Islands/UWP-XamlApplication/App.xaml.cs @@ -11,13 +11,13 @@ using Windows.ApplicationModel.Activation; using Windows.Foundation; using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; namespace UWP_XamlApplication { diff --git a/Samples/XAML Islands/UWP-XamlApplication/SamplePage.xaml.cs b/Samples/XAML Islands/UWP-XamlApplication/SamplePage.xaml.cs index 955a32a..8cfb75e 100644 --- a/Samples/XAML Islands/UWP-XamlApplication/SamplePage.xaml.cs +++ b/Samples/XAML Islands/UWP-XamlApplication/SamplePage.xaml.cs @@ -9,13 +9,13 @@ using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 diff --git a/build/build.cake b/build/build.cake index 446d16a..34de89c 100644 --- a/build/build.cake +++ b/build/build.cake @@ -1,7 +1,7 @@ -#module nuget:?package=Cake.LongPath.Module&version=0.5.0 +#module nuget:?package=Cake.LongPath.Module&version=0.7.0 -#addin "Cake.FileHelpers" -#addin "Cake.Powershell" +#addin nuget:?package=Cake.FileHelpers&version=3.2.1 +#addin nuget:?package=Cake.Powershell&version=0.4.8 using System; using System.Linq; @@ -53,7 +53,7 @@ void VerifyHeaders(bool Replace) Func exclude_objDir = fileSystemInfo => !fileSystemInfo.Path.Segments.Contains("obj"); - var files = GetFiles(baseDir + "/**/*.cs", exclude_objDir).Where(file => + var files = GetFiles(baseDir + "/**/*.cs", new GlobberSettings { Predicate = exclude_objDir }).Where(file => { var path = file.ToString(); return !(path.EndsWith(".g.cs") || path.EndsWith(".i.cs") || System.IO.Path.GetFileName(path).Contains("TemporaryGeneratedFile")); @@ -246,7 +246,7 @@ Task("StyleXaml") Func exclude_objDir = fileSystemInfo => !fileSystemInfo.Path.Segments.Contains("obj"); - var files = GetFiles(baseDir + "/**/*.xaml", exclude_objDir); + var files = GetFiles(baseDir + "/**/*.xaml", new GlobberSettings { Predicate = exclude_objDir }); Information("\nChecking " + files.Count() + " file(s) for XAML Structure"); foreach(var file in files) { diff --git a/build/tools/packages.config b/build/tools/packages.config new file mode 100644 index 0000000..ec87d00 --- /dev/null +++ b/build/tools/packages.config @@ -0,0 +1,4 @@ + + + + diff --git a/global.json b/global.json index e6e7cdb..80d84a2 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "MSBuild.Sdk.Extras": "2.0.43" + "MSBuild.Sdk.Extras": "2.0.54" } } \ No newline at end of file From 9509fa89d88308095d729cb5f5148764be8f8348 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Mon, 24 Feb 2020 16:37:55 -0800 Subject: [PATCH 02/21] Updated to WinUI 3.0 Alpha (February 2020). --- .../PeoplePicker/PeoplePicker.Properties.cs | 13 +- .../Microsoft.Toolkit.Graph.Controls.csproj | 2 +- .../TestObservableCollection.cs | 343 ++++++++++++++++++ SampleTest/SampleTest.csproj | 2 +- 4 files changed, 351 insertions(+), 9 deletions(-) create mode 100644 Microsoft.Toolkit.Graph.Controls/TestObservableCollection.cs diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.Properties.cs b/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.Properties.cs index df4de5f..62a764a 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.Properties.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.Properties.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.ObjectModel; using Microsoft.Graph; using Microsoft.Toolkit.Uwp.UI.Controls; using Microsoft.UI.Xaml; @@ -17,9 +16,9 @@ public partial class PeoplePicker /// /// Gets the set of objects chosen by the user. /// - public ObservableCollection PickedPeople + public TestObservableCollection PickedPeople { - get { return (ObservableCollection)GetValue(SelectedPeopleProperty); } + get { return (TestObservableCollection)GetValue(SelectedPeopleProperty); } internal set { SetValue(SelectedPeopleProperty, value); } } @@ -30,14 +29,14 @@ public ObservableCollection PickedPeople /// The identifier for the dependency property. /// public static readonly DependencyProperty SelectedPeopleProperty = - DependencyProperty.Register(nameof(PickedPeople), typeof(ObservableCollection), typeof(PeoplePicker), new PropertyMetadata(new ObservableCollection())); + DependencyProperty.Register(nameof(PickedPeople), typeof(TestObservableCollection), typeof(PeoplePicker), new PropertyMetadata(new TestObservableCollection())); /// /// Gets or sets collection of people suggested by the graph from the user's query. /// - public ObservableCollection SuggestedPeople + public TestObservableCollection SuggestedPeople { - get { return (ObservableCollection)GetValue(SuggestedPeopleProperty); } + get { return (TestObservableCollection)GetValue(SuggestedPeopleProperty); } set { SetValue(SuggestedPeopleProperty, value); } } @@ -48,6 +47,6 @@ public ObservableCollection SuggestedPeople /// The identifier for the dependency property. /// public static readonly DependencyProperty SuggestedPeopleProperty = - DependencyProperty.Register(nameof(SuggestedPeople), typeof(ObservableCollection), typeof(PeoplePicker), new PropertyMetadata(new ObservableCollection())); + DependencyProperty.Register(nameof(SuggestedPeople), typeof(TestObservableCollection), typeof(PeoplePicker), new PropertyMetadata(new TestObservableCollection())); } } diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 35cea03..5e34b2b 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -31,7 +31,7 @@ - 3.0.0-alpha.191101.0 + 3.0.0-alpha.200210.0 diff --git a/Microsoft.Toolkit.Graph.Controls/TestObservableCollection.cs b/Microsoft.Toolkit.Graph.Controls/TestObservableCollection.cs new file mode 100644 index 0000000..6dadf2c --- /dev/null +++ b/Microsoft.Toolkit.Graph.Controls/TestObservableCollection.cs @@ -0,0 +1,343 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Interop; + +namespace Microsoft.Toolkit.Graph.Controls +{ + // .NET collection types are tightly coupled with WUX types - e.g., ObservableCollection + // maps to WUX.INotifyCollectionChanged, and creates WUX.NotifyCollectionChangedEventArgs + // when raising its INCC event. This is a problem because we've switched everything else over + // to use MUX types, such that creating WUX types raises an RPC_E_WRONG_THREAD error + // due to DXamlCore not being initialized. For the purposes of our tests, we're providing + // our own implementation of TestObservableCollection that implements MUX.INotifyCollectionChanged. +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + public class TestObservableCollection : Collection, Microsoft.UI.Xaml.Interop.INotifyCollectionChanged, INotifyPropertyChanged + { + private ReentrancyGuard reentrancyGuard = null; + + private class ReentrancyGuard : IDisposable + { + private TestObservableCollection owningCollection; + + public ReentrancyGuard(TestObservableCollection owningCollection) + { + owningCollection.CheckReentrancy(); + owningCollection.reentrancyGuard = this; + this.owningCollection = owningCollection; + } + + public void Dispose() + { + owningCollection.reentrancyGuard = null; + } + } + + public TestObservableCollection() + : base() + { + } + + public TestObservableCollection(IList list) + : base(list.ToList()) + { + } + + public TestObservableCollection(IEnumerable collection) + : base(collection.ToList()) + { + } + + public event NotifyCollectionChangedEventHandler CollectionChanged; + + public void Move(int oldIndex, int newIndex) + { + MoveItem(oldIndex, newIndex); + } + + protected IDisposable BlockReentrancy() + { + return new ReentrancyGuard(this); + } + + protected void CheckReentrancy() + { + if (reentrancyGuard != null) + { + throw new InvalidOperationException("Collection cannot be modified in a collection changed handler."); + } + } + + protected override void ClearItems() + { + CheckReentrancy(); + + TestBindableVector oldItems = new TestBindableVector(this); + + base.ClearItems(); + OnCollectionChanged( + global::System.Collections.Specialized.NotifyCollectionChangedAction.Reset, + null, + oldItems, + 0, + 0); + } + + protected override void InsertItem(int index, T item) + { + CheckReentrancy(); + + TestBindableVector newItem = new TestBindableVector(); + newItem.Add(item); + + base.InsertItem(index, item); + OnCollectionChanged( + global::System.Collections.Specialized.NotifyCollectionChangedAction.Add, + newItem, + null, + index, + 0); + } + + protected virtual void MoveItem(int oldIndex, int newIndex) + { + CheckReentrancy(); + + TestBindableVector oldItem = new TestBindableVector(); + oldItem.Add(this[oldIndex]); + TestBindableVector newItem = new TestBindableVector(oldItem); + + T item = this[oldIndex]; + base.RemoveAt(oldIndex); + base.InsertItem(newIndex, item); + OnCollectionChanged( + global::System.Collections.Specialized.NotifyCollectionChangedAction.Move, + newItem, + oldItem, + newIndex, + oldIndex); + } + + protected override void RemoveItem(int index) + { + CheckReentrancy(); + + TestBindableVector oldItem = new TestBindableVector(); + oldItem.Add(this[index]); + + base.RemoveItem(index); + OnCollectionChanged( + global::System.Collections.Specialized.NotifyCollectionChangedAction.Remove, + null, + oldItem, + 0, + index); + } + + protected override void SetItem(int index, T item) + { + CheckReentrancy(); + + TestBindableVector oldItem = new TestBindableVector(); + oldItem.Add(this[index]); + TestBindableVector newItem = new TestBindableVector(); + newItem.Add(item); + + base.SetItem(index, item); + OnCollectionChanged( + global::System.Collections.Specialized.NotifyCollectionChangedAction.Replace, + newItem, + oldItem, + index, + index); + } + + protected virtual void OnCollectionChanged( + global::System.Collections.Specialized.NotifyCollectionChangedAction action, + IBindableVector newItems, + IBindableVector oldItems, + int newIndex, + int oldIndex) + { + OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, newItems, oldItems, newIndex, oldIndex)); + } + + protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e) + { + using (BlockReentrancy()) + { + CollectionChanged?.Invoke(this, e); + } + } + + public event PropertyChangedEventHandler PropertyChanged; + } + +#pragma warning disable SA1402 // File may only contain a single class + public class TestBindableVector : IList, IBindableVector +#pragma warning restore SA1402 // File may only contain a single class + { + private IList implementation; + + public TestBindableVector() + { + implementation = new List(); + } + + public TestBindableVector(IList list) + { + implementation = new List(list); + } + + public T this[int index] { get => implementation[index]; set => implementation[index] = value; } + + public int Count => implementation.Count; + + public virtual bool IsReadOnly => implementation.IsReadOnly; + + public void Add(T item) + { + implementation.Add(item); + } + + public void Clear() + { + implementation.Clear(); + } + + public bool Contains(T item) + { + return implementation.Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + implementation.CopyTo(array, arrayIndex); + } + + public IEnumerator GetEnumerator() + { + return implementation.GetEnumerator(); + } + + public int IndexOf(T item) + { + return implementation.IndexOf(item); + } + + public void Insert(int index, T item) + { + implementation.Insert(index, item); + } + + public bool Remove(T item) + { + return implementation.Remove(item); + } + + public void RemoveAt(int index) + { + implementation.RemoveAt(index); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return implementation.GetEnumerator(); + } + + public object GetAt(uint index) + { + return implementation[(int)index]; + } + + public IBindableVectorView GetView() + { + return new TestBindableVectorView(implementation); + } + + public bool IndexOf(object value, out uint index) + { + int indexOf = implementation.IndexOf((T)value); + + if (indexOf >= 0) + { + index = (uint)indexOf; + return true; + } + else + { + index = 0; + return false; + } + } + + public void SetAt(uint index, object value) + { + implementation[(int)index] = (T)value; + } + + public void InsertAt(uint index, object value) + { + implementation.Insert((int)index, (T)value); + } + + public void RemoveAt(uint index) + { + implementation.RemoveAt((int)index); + } + + public void Append(object value) + { + implementation.Add((T)value); + } + + public void RemoveAtEnd() + { + implementation.RemoveAt(implementation.Count - 1); + } + + public uint Size => (uint)implementation.Count; + + public IBindableIterator First() + { + return new TestBindableIterator(implementation); + } + } + +#pragma warning disable SA1402 // File may only contain a single class + public class TestBindableVectorView : TestBindableVector, IBindableVectorView +#pragma warning restore SA1402 // File may only contain a single class + { + public TestBindableVectorView(IList list) + : base(list) + { + } + + public override bool IsReadOnly => true; + } + +#pragma warning disable SA1402 // File may only contain a single class + public class TestBindableIterator : IBindableIterator +#pragma warning restore SA1402 // File may only contain a single class + { + private readonly IEnumerator enumerator; + + public TestBindableIterator(IEnumerable enumerable) + { + enumerator = enumerable.GetEnumerator(); + } + + public bool MoveNext() + { + return enumerator.MoveNext(); + } + + public object Current => enumerator.Current; + + public bool HasCurrent => enumerator.Current != null; + } +#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member +} \ No newline at end of file diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj index 97ce4cf..f99cc5f 100644 --- a/SampleTest/SampleTest.csproj +++ b/SampleTest/SampleTest.csproj @@ -156,7 +156,7 @@ 6.2.9 - 3.0.0-alpha.191101.0 + 3.0.0-alpha.200210.0 From f0d608802d56647f0f9e11ed7fa6bf7c894f966d Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Mon, 24 Feb 2020 16:41:57 -0800 Subject: [PATCH 03/21] Added missing header. --- .../TestObservableCollection.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Microsoft.Toolkit.Graph.Controls/TestObservableCollection.cs b/Microsoft.Toolkit.Graph.Controls/TestObservableCollection.cs index 6dadf2c..380d77a 100644 --- a/Microsoft.Toolkit.Graph.Controls/TestObservableCollection.cs +++ b/Microsoft.Toolkit.Graph.Controls/TestObservableCollection.cs @@ -1,4 +1,8 @@ -using System; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -111,7 +115,7 @@ protected virtual void MoveItem(int oldIndex, int newIndex) TestBindableVector newItem = new TestBindableVector(oldItem); T item = this[oldIndex]; - base.RemoveAt(oldIndex); + RemoveAt(oldIndex); base.InsertItem(newIndex, item); OnCollectionChanged( global::System.Collections.Specialized.NotifyCollectionChangedAction.Move, @@ -173,7 +177,9 @@ protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e) } } +#pragma warning disable CS0067 public event PropertyChangedEventHandler PropertyChanged; +#pragma warning restore CS0067 } #pragma warning disable SA1402 // File may only contain a single class From c74557bb1abc8c904fb9e6b2f7bc40698df7a7bd Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Mon, 24 Feb 2020 19:26:17 -0800 Subject: [PATCH 04/21] Updated version. --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 585f60b..a9ad31d 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "6.1.0-build.{height}", + "version": "7.0.0-build.{height}", "publicReleaseRefSpec": [ "^refs/heads/master$", // we release out of master "^refs/heads/dev$", // we release out of dev From 0c34c1d7894cf26375648287ef51dd9d3da7c491 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Tue, 24 Mar 2020 14:02:19 -0700 Subject: [PATCH 05/21] Changed version to 8.0.0. --- .../Microsoft.Toolkit.Graph.Controls.csproj | 4 ++-- Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj | 2 +- version.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 5e34b2b..0448ee3 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -27,8 +27,8 @@ - - + + 3.0.0-alpha.200210.0 diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index 43b0c99..aa57a36 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -23,6 +23,6 @@ - + diff --git a/version.json b/version.json index a9ad31d..160409f 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "7.0.0-build.{height}", + "version": "8.0.0-build.{height}", "publicReleaseRefSpec": [ "^refs/heads/master$", // we release out of master "^refs/heads/dev$", // we release out of dev From 03cac2805412aeeb176e93980d083ddbfc401f86 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Sun, 17 May 2020 16:36:48 -0700 Subject: [PATCH 06/21] Updated to WInUI3 preview1. --- Directory.Build.props | 8 +- Directory.Build.targets | 20 - .../PeoplePicker/PeoplePicker.Properties.cs | 13 +- .../Microsoft.Toolkit.Graph.Controls.csproj | 60 +- .../TestObservableCollection.cs | 349 ---- .../Microsoft.Toolkit.Graph.csproj | 13 +- .../Images}/LockScreenLogo.scale-200.png | Bin .../Images}/SplashScreen.scale-200.png | Bin .../Images}/Square150x150Logo.scale-200.png | Bin .../Images}/Square44x44Logo.scale-200.png | Bin ...x44Logo.targetsize-24_altform-unplated.png | Bin .../Images}/StoreLogo.png | Bin .../Images}/Wide310x150Logo.scale-200.png | Bin .../Package.appxmanifest | 26 +- SampleTest.Package/SampleTest.Package.wapproj | 63 + .../build/LiftedWinRTClassRegistrations.xml | 1701 +++++++++++++++++ .../build/Microsoft.WinUI.AppX.targets | 170 ++ SampleTest/App.xaml | 8 +- SampleTest/App.xaml.cs | 86 +- SampleTest/MainWindow.xaml | 9 + SampleTest/MainWindow.xaml.cs | 16 + SampleTest/Properties/AssemblyInfo.cs | 31 - SampleTest/Properties/Default.rd.xml | 31 - SampleTest/SampleTest.csproj | 238 +-- SampleTest/app.manifest | 15 + Windows-Toolkit-Graph-Controls.sln | 139 +- build/CopyPri.targets | 5 + build/build.cake | 21 + nuget.config | 15 +- 29 files changed, 2204 insertions(+), 833 deletions(-) delete mode 100644 Microsoft.Toolkit.Graph.Controls/TestObservableCollection.cs rename {SampleTest/Assets => SampleTest.Package/Images}/LockScreenLogo.scale-200.png (100%) rename {SampleTest/Assets => SampleTest.Package/Images}/SplashScreen.scale-200.png (100%) rename {SampleTest/Assets => SampleTest.Package/Images}/Square150x150Logo.scale-200.png (100%) rename {SampleTest/Assets => SampleTest.Package/Images}/Square44x44Logo.scale-200.png (100%) rename {SampleTest/Assets => SampleTest.Package/Images}/Square44x44Logo.targetsize-24_altform-unplated.png (100%) rename {SampleTest/Assets => SampleTest.Package/Images}/StoreLogo.png (100%) rename {SampleTest/Assets => SampleTest.Package/Images}/Wide310x150Logo.scale-200.png (100%) rename {SampleTest => SampleTest.Package}/Package.appxmanifest (56%) create mode 100644 SampleTest.Package/SampleTest.Package.wapproj create mode 100644 SampleTest.Package/build/LiftedWinRTClassRegistrations.xml create mode 100644 SampleTest.Package/build/Microsoft.WinUI.AppX.targets create mode 100644 SampleTest/MainWindow.xaml create mode 100644 SampleTest/MainWindow.xaml.cs delete mode 100644 SampleTest/Properties/AssemblyInfo.cs delete mode 100644 SampleTest/Properties/Default.rd.xml create mode 100644 SampleTest/app.manifest create mode 100644 build/CopyPri.targets diff --git a/Directory.Build.props b/Directory.Build.props index 19de810..a0accaf 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -17,7 +17,10 @@ $(MSBuildProjectName.Contains('Wpf')) 18362 17134 + 10.0.$(DefaultTargetPlatformVersion).0 + 10.0.$(DefaultTargetPlatformMinVersion).0 $(MSBuildThisFileDirectory)bin\nupkg + CS8002;CS8305 @@ -55,13 +58,10 @@ - - - - true + false diff --git a/Directory.Build.targets b/Directory.Build.targets index 52bf508..a9875fa 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,24 +1,4 @@ - - - - - 10.0.$(DefaultTargetPlatformVersion).0 - 10.0.$(DefaultTargetPlatformMinVersion).0 - Full - - - - - Windows Desktop Extensions for the UWP - - - Windows Mobile Extensions for the UWP - - - - - diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.Properties.cs b/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.Properties.cs index 62a764a..df4de5f 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.Properties.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.Properties.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.ObjectModel; using Microsoft.Graph; using Microsoft.Toolkit.Uwp.UI.Controls; using Microsoft.UI.Xaml; @@ -16,9 +17,9 @@ public partial class PeoplePicker /// /// Gets the set of objects chosen by the user. /// - public TestObservableCollection PickedPeople + public ObservableCollection PickedPeople { - get { return (TestObservableCollection)GetValue(SelectedPeopleProperty); } + get { return (ObservableCollection)GetValue(SelectedPeopleProperty); } internal set { SetValue(SelectedPeopleProperty, value); } } @@ -29,14 +30,14 @@ public TestObservableCollection PickedPeople /// The identifier for the dependency property. /// public static readonly DependencyProperty SelectedPeopleProperty = - DependencyProperty.Register(nameof(PickedPeople), typeof(TestObservableCollection), typeof(PeoplePicker), new PropertyMetadata(new TestObservableCollection())); + DependencyProperty.Register(nameof(PickedPeople), typeof(ObservableCollection), typeof(PeoplePicker), new PropertyMetadata(new ObservableCollection())); /// /// Gets or sets collection of people suggested by the graph from the user's query. /// - public TestObservableCollection SuggestedPeople + public ObservableCollection SuggestedPeople { - get { return (TestObservableCollection)GetValue(SuggestedPeopleProperty); } + get { return (ObservableCollection)GetValue(SuggestedPeopleProperty); } set { SetValue(SuggestedPeopleProperty, value); } } @@ -47,6 +48,6 @@ public TestObservableCollection SuggestedPeople /// The identifier for the dependency property. /// public static readonly DependencyProperty SuggestedPeopleProperty = - DependencyProperty.Register(nameof(SuggestedPeople), typeof(TestObservableCollection), typeof(PeoplePicker), new PropertyMetadata(new TestObservableCollection())); + DependencyProperty.Register(nameof(SuggestedPeople), typeof(ObservableCollection), typeof(PeoplePicker), new PropertyMetadata(new ObservableCollection())); } } diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 0448ee3..5ed7bc4 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -1,7 +1,7 @@ - + - uap10.0.17134 + netcoreapp5.0 Windows Community Toolkit Graph Controls Microsoft.Toolkit.Graph.Controls @@ -13,25 +13,39 @@ - PeoplePicker: The PeoplePicker Control is a simple control that allows for selection of one or more users. UWP Toolkit Windows Controls MSAL Microsoft Graph AadLogin ProfileCard Person PeoplePicker Login - false - true - Debug;Release;CI - AnyCPU;ARM;ARM64;x64;x86 - $(NoWarn);CS8002;CS8305 - true - WinUI-Alpha-Projects-Don-t-Use-SDK-Xaml-Tools + + false + uap10.0.$(DefaultTargetPlatformMinVersion) - + + + + + - - + + true + lib\$(TargetFramework)\$(AssemblyName) + + + + + true + lib\$(TargetFramework)\$(AssemblyName)\$(AssemblyName).xr.xml + + + + + + + - 3.0.0-alpha.200210.0 + 3.0.0-preview1.200515.1-CI @@ -43,20 +57,12 @@ - + - - MSBuild:Compile - + + true + lib\$(TargetFramework)\$(AssemblyName)\Assets\person.png + - - - - - - - - - - + diff --git a/Microsoft.Toolkit.Graph.Controls/TestObservableCollection.cs b/Microsoft.Toolkit.Graph.Controls/TestObservableCollection.cs deleted file mode 100644 index 380d77a..0000000 --- a/Microsoft.Toolkit.Graph.Controls/TestObservableCollection.cs +++ /dev/null @@ -1,349 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using Microsoft.UI.Xaml.Data; -using Microsoft.UI.Xaml.Interop; - -namespace Microsoft.Toolkit.Graph.Controls -{ - // .NET collection types are tightly coupled with WUX types - e.g., ObservableCollection - // maps to WUX.INotifyCollectionChanged, and creates WUX.NotifyCollectionChangedEventArgs - // when raising its INCC event. This is a problem because we've switched everything else over - // to use MUX types, such that creating WUX types raises an RPC_E_WRONG_THREAD error - // due to DXamlCore not being initialized. For the purposes of our tests, we're providing - // our own implementation of TestObservableCollection that implements MUX.INotifyCollectionChanged. -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - public class TestObservableCollection : Collection, Microsoft.UI.Xaml.Interop.INotifyCollectionChanged, INotifyPropertyChanged - { - private ReentrancyGuard reentrancyGuard = null; - - private class ReentrancyGuard : IDisposable - { - private TestObservableCollection owningCollection; - - public ReentrancyGuard(TestObservableCollection owningCollection) - { - owningCollection.CheckReentrancy(); - owningCollection.reentrancyGuard = this; - this.owningCollection = owningCollection; - } - - public void Dispose() - { - owningCollection.reentrancyGuard = null; - } - } - - public TestObservableCollection() - : base() - { - } - - public TestObservableCollection(IList list) - : base(list.ToList()) - { - } - - public TestObservableCollection(IEnumerable collection) - : base(collection.ToList()) - { - } - - public event NotifyCollectionChangedEventHandler CollectionChanged; - - public void Move(int oldIndex, int newIndex) - { - MoveItem(oldIndex, newIndex); - } - - protected IDisposable BlockReentrancy() - { - return new ReentrancyGuard(this); - } - - protected void CheckReentrancy() - { - if (reentrancyGuard != null) - { - throw new InvalidOperationException("Collection cannot be modified in a collection changed handler."); - } - } - - protected override void ClearItems() - { - CheckReentrancy(); - - TestBindableVector oldItems = new TestBindableVector(this); - - base.ClearItems(); - OnCollectionChanged( - global::System.Collections.Specialized.NotifyCollectionChangedAction.Reset, - null, - oldItems, - 0, - 0); - } - - protected override void InsertItem(int index, T item) - { - CheckReentrancy(); - - TestBindableVector newItem = new TestBindableVector(); - newItem.Add(item); - - base.InsertItem(index, item); - OnCollectionChanged( - global::System.Collections.Specialized.NotifyCollectionChangedAction.Add, - newItem, - null, - index, - 0); - } - - protected virtual void MoveItem(int oldIndex, int newIndex) - { - CheckReentrancy(); - - TestBindableVector oldItem = new TestBindableVector(); - oldItem.Add(this[oldIndex]); - TestBindableVector newItem = new TestBindableVector(oldItem); - - T item = this[oldIndex]; - RemoveAt(oldIndex); - base.InsertItem(newIndex, item); - OnCollectionChanged( - global::System.Collections.Specialized.NotifyCollectionChangedAction.Move, - newItem, - oldItem, - newIndex, - oldIndex); - } - - protected override void RemoveItem(int index) - { - CheckReentrancy(); - - TestBindableVector oldItem = new TestBindableVector(); - oldItem.Add(this[index]); - - base.RemoveItem(index); - OnCollectionChanged( - global::System.Collections.Specialized.NotifyCollectionChangedAction.Remove, - null, - oldItem, - 0, - index); - } - - protected override void SetItem(int index, T item) - { - CheckReentrancy(); - - TestBindableVector oldItem = new TestBindableVector(); - oldItem.Add(this[index]); - TestBindableVector newItem = new TestBindableVector(); - newItem.Add(item); - - base.SetItem(index, item); - OnCollectionChanged( - global::System.Collections.Specialized.NotifyCollectionChangedAction.Replace, - newItem, - oldItem, - index, - index); - } - - protected virtual void OnCollectionChanged( - global::System.Collections.Specialized.NotifyCollectionChangedAction action, - IBindableVector newItems, - IBindableVector oldItems, - int newIndex, - int oldIndex) - { - OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, newItems, oldItems, newIndex, oldIndex)); - } - - protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e) - { - using (BlockReentrancy()) - { - CollectionChanged?.Invoke(this, e); - } - } - -#pragma warning disable CS0067 - public event PropertyChangedEventHandler PropertyChanged; -#pragma warning restore CS0067 - } - -#pragma warning disable SA1402 // File may only contain a single class - public class TestBindableVector : IList, IBindableVector -#pragma warning restore SA1402 // File may only contain a single class - { - private IList implementation; - - public TestBindableVector() - { - implementation = new List(); - } - - public TestBindableVector(IList list) - { - implementation = new List(list); - } - - public T this[int index] { get => implementation[index]; set => implementation[index] = value; } - - public int Count => implementation.Count; - - public virtual bool IsReadOnly => implementation.IsReadOnly; - - public void Add(T item) - { - implementation.Add(item); - } - - public void Clear() - { - implementation.Clear(); - } - - public bool Contains(T item) - { - return implementation.Contains(item); - } - - public void CopyTo(T[] array, int arrayIndex) - { - implementation.CopyTo(array, arrayIndex); - } - - public IEnumerator GetEnumerator() - { - return implementation.GetEnumerator(); - } - - public int IndexOf(T item) - { - return implementation.IndexOf(item); - } - - public void Insert(int index, T item) - { - implementation.Insert(index, item); - } - - public bool Remove(T item) - { - return implementation.Remove(item); - } - - public void RemoveAt(int index) - { - implementation.RemoveAt(index); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return implementation.GetEnumerator(); - } - - public object GetAt(uint index) - { - return implementation[(int)index]; - } - - public IBindableVectorView GetView() - { - return new TestBindableVectorView(implementation); - } - - public bool IndexOf(object value, out uint index) - { - int indexOf = implementation.IndexOf((T)value); - - if (indexOf >= 0) - { - index = (uint)indexOf; - return true; - } - else - { - index = 0; - return false; - } - } - - public void SetAt(uint index, object value) - { - implementation[(int)index] = (T)value; - } - - public void InsertAt(uint index, object value) - { - implementation.Insert((int)index, (T)value); - } - - public void RemoveAt(uint index) - { - implementation.RemoveAt((int)index); - } - - public void Append(object value) - { - implementation.Add((T)value); - } - - public void RemoveAtEnd() - { - implementation.RemoveAt(implementation.Count - 1); - } - - public uint Size => (uint)implementation.Count; - - public IBindableIterator First() - { - return new TestBindableIterator(implementation); - } - } - -#pragma warning disable SA1402 // File may only contain a single class - public class TestBindableVectorView : TestBindableVector, IBindableVectorView -#pragma warning restore SA1402 // File may only contain a single class - { - public TestBindableVectorView(IList list) - : base(list) - { - } - - public override bool IsReadOnly => true; - } - -#pragma warning disable SA1402 // File may only contain a single class - public class TestBindableIterator : IBindableIterator -#pragma warning restore SA1402 // File may only contain a single class - { - private readonly IEnumerator enumerator; - - public TestBindableIterator(IEnumerable enumerable) - { - enumerator = enumerable.GetEnumerator(); - } - - public bool MoveNext() - { - return enumerator.MoveNext(); - } - - public object Current => enumerator.Current; - - public bool HasCurrent => enumerator.Current != null; - } -#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member -} \ No newline at end of file diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index aa57a36..326eb85 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -1,7 +1,7 @@ - + - uap10.0.17134;netstandard2.0 + netstandard2.0 Windows Community Toolkit .NET Standard Graph Services This package includes .NET Standard code helpers such as: @@ -9,15 +9,6 @@ - GlobalProvider: A shared provider instance used by the Microsoft.Toolkit.Graph.Controls. UWP Graph Toolkit Windows Provider extensions helpers - - - Full - Debug;Release;CI - AnyCPU;ARM;ARM64;x64;x86 - - - - $(DefineConstants);WINRT diff --git a/SampleTest/Assets/LockScreenLogo.scale-200.png b/SampleTest.Package/Images/LockScreenLogo.scale-200.png similarity index 100% rename from SampleTest/Assets/LockScreenLogo.scale-200.png rename to SampleTest.Package/Images/LockScreenLogo.scale-200.png diff --git a/SampleTest/Assets/SplashScreen.scale-200.png b/SampleTest.Package/Images/SplashScreen.scale-200.png similarity index 100% rename from SampleTest/Assets/SplashScreen.scale-200.png rename to SampleTest.Package/Images/SplashScreen.scale-200.png diff --git a/SampleTest/Assets/Square150x150Logo.scale-200.png b/SampleTest.Package/Images/Square150x150Logo.scale-200.png similarity index 100% rename from SampleTest/Assets/Square150x150Logo.scale-200.png rename to SampleTest.Package/Images/Square150x150Logo.scale-200.png diff --git a/SampleTest/Assets/Square44x44Logo.scale-200.png b/SampleTest.Package/Images/Square44x44Logo.scale-200.png similarity index 100% rename from SampleTest/Assets/Square44x44Logo.scale-200.png rename to SampleTest.Package/Images/Square44x44Logo.scale-200.png diff --git a/SampleTest/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/SampleTest.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png similarity index 100% rename from SampleTest/Assets/Square44x44Logo.targetsize-24_altform-unplated.png rename to SampleTest.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png diff --git a/SampleTest/Assets/StoreLogo.png b/SampleTest.Package/Images/StoreLogo.png similarity index 100% rename from SampleTest/Assets/StoreLogo.png rename to SampleTest.Package/Images/StoreLogo.png diff --git a/SampleTest/Assets/Wide310x150Logo.scale-200.png b/SampleTest.Package/Images/Wide310x150Logo.scale-200.png similarity index 100% rename from SampleTest/Assets/Wide310x150Logo.scale-200.png rename to SampleTest.Package/Images/Wide310x150Logo.scale-200.png diff --git a/SampleTest/Package.appxmanifest b/SampleTest.Package/Package.appxmanifest similarity index 56% rename from SampleTest/Package.appxmanifest rename to SampleTest.Package/Package.appxmanifest index 5271618..890e1e4 100644 --- a/SampleTest/Package.appxmanifest +++ b/SampleTest.Package/Package.appxmanifest @@ -2,25 +2,24 @@ + xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" + IgnorableNamespaces="uap rescap"> - - SampleTest mhawker - Assets\StoreLogo.png + Images\StoreLogo.png + @@ -30,20 +29,21 @@ + EntryPoint="$targetentrypoint$"> - - + BackgroundColor="transparent" + Square150x150Logo="Images\Square150x150Logo.png" + Square44x44Logo="Images\Square44x44Logo.png"> + + + - \ No newline at end of file + diff --git a/SampleTest.Package/SampleTest.Package.wapproj b/SampleTest.Package/SampleTest.Package.wapproj new file mode 100644 index 0000000..e2cb852 --- /dev/null +++ b/SampleTest.Package/SampleTest.Package.wapproj @@ -0,0 +1,63 @@ + + + + 15.0 + + + + Debug + x86 + + + Release + x86 + + + Debug + x64 + + + Release + x64 + + + + $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\ + SampleTest\ + + + + d67eba45-b0cd-4bef-a2d9-6bada1b47d78 + 10.0.18362.0 + 10.0.17134.0 + en-US + false + ..\SampleTest\SampleTest.csproj + + + + Designer + + + + + + + + + + + + + + True + + + + + + + + + + \ No newline at end of file diff --git a/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml b/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml new file mode 100644 index 0000000..5340f34 --- /dev/null +++ b/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml @@ -0,0 +1,1701 @@ + + + + dcompi.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CoreMessagingXP.dll + + + + + + + + + + + + Microsoft.UI.Input.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Microsoft.UI.Xaml.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Microsoft.UI.Xaml.Controls.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Microsoft.UI.Xaml.Phone.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SampleTest.Package/build/Microsoft.WinUI.AppX.targets b/SampleTest.Package/build/Microsoft.WinUI.AppX.targets new file mode 100644 index 0000000..f728cf1 --- /dev/null +++ b/SampleTest.Package/build/Microsoft.WinUI.AppX.targets @@ -0,0 +1,170 @@ + + + + + + + + $(MSBuildThisFileDirectory) + + + + + + + + + + + + + + + + + + + + + + + + + + $(MSBuildWarningsAsMessages);APPX1707 + + + + + UAP + Windows + 10.0 + + true + false + en-US + + + + + + + + + + + + + <_MuxRuntimeIdentifier Condition="'$(Platform)' == 'Win32'">win10-x86 + <_MuxRuntimeIdentifier Condition="'$(Platform)' != 'Win32'">win10-$(Platform) + + + + $([MSBuild]::MakeRelative($(MSBuildThisFileDirectory)..\runtimes\$(_MuxRuntimeIdentifier)\native\, %(RootDir)%(Directory))) + + + + + + + + + %(WapProjPackageFile.DestinationSubDirectory)%(TargetPath) + + + %(UploadWapProjPackageFile.DestinationSubDirectory)%(TargetPath) + + + + + diff --git a/SampleTest/App.xaml b/SampleTest/App.xaml index 9c1a20e..170e53a 100644 --- a/SampleTest/App.xaml +++ b/SampleTest/App.xaml @@ -3,5 +3,11 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:SampleTest"> - + + + + + + + diff --git a/SampleTest/App.xaml.cs b/SampleTest/App.xaml.cs index 79a0f04..9a2903e 100644 --- a/SampleTest/App.xaml.cs +++ b/SampleTest/App.xaml.cs @@ -2,103 +2,29 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; using Windows.ApplicationModel; -using Windows.ApplicationModel.Activation; -using Windows.Foundation; -using Windows.Foundation.Collections; using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Controls.Primitives; -using Microsoft.UI.Xaml.Data; -using Microsoft.UI.Xaml.Input; -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Navigation; namespace SampleTest { - /// - /// Provides application-specific behavior to supplement the default Application class. - /// - sealed partial class App : Application + sealed partial class App { - /// - /// Initializes the singleton application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). - /// + private MainWindow m_window; + public App() { this.InitializeComponent(); this.Suspending += OnSuspending; } - /// - /// Invoked when the application is launched normally by the end user. Other entry points - /// will be used such as when the application is launched to open a specific file. - /// - /// Details about the launch request and process. - protected override void OnLaunched(LaunchActivatedEventArgs e) - { - Frame rootFrame = Window.Current.Content as Frame; - - // Do not repeat app initialization when the Window already has content, - // just ensure that the window is active - if (rootFrame == null) - { - // Create a Frame to act as the navigation context and navigate to the first page - rootFrame = new Frame(); - - rootFrame.NavigationFailed += OnNavigationFailed; - - if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) - { - //TODO: Load state from previously suspended application - } - - // Place the frame in the current Window - Window.Current.Content = rootFrame; - } - - if (e.PrelaunchActivated == false) - { - if (rootFrame.Content == null) - { - // When the navigation stack isn't restored navigate to the first page, - // configuring the new page by passing required information as a navigation - // parameter - rootFrame.Navigate(typeof(MainPage), e.Arguments); - } - // Ensure the current window is active - Window.Current.Activate(); - } - } - - /// - /// Invoked when Navigation to a certain page fails - /// - /// The Frame which failed navigation - /// Details about the navigation failure - void OnNavigationFailed(object sender, NavigationFailedEventArgs e) + protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) { - throw new Exception("Failed to load Page " + e.SourcePageType.FullName); + m_window = new MainWindow(); + m_window.Activate(); } - /// - /// Invoked when application execution is being suspended. Application state is saved - /// without knowing whether the application will be terminated or resumed with the contents - /// of memory still intact. - /// - /// The source of the suspend request. - /// Details about the suspend request. private void OnSuspending(object sender, SuspendingEventArgs e) { - var deferral = e.SuspendingOperation.GetDeferral(); - //TODO: Save application state and stop any background activity - deferral.Complete(); } } } diff --git a/SampleTest/MainWindow.xaml b/SampleTest/MainWindow.xaml new file mode 100644 index 0000000..6013244 --- /dev/null +++ b/SampleTest/MainWindow.xaml @@ -0,0 +1,9 @@ + + + diff --git a/SampleTest/MainWindow.xaml.cs b/SampleTest/MainWindow.xaml.cs new file mode 100644 index 0000000..9492b50 --- /dev/null +++ b/SampleTest/MainWindow.xaml.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace SampleTest +{ + public sealed partial class MainWindow + { + public MainWindow() + { + InitializeComponent(); + + rootFrame.Navigate(typeof(MainPage)); + } + } +} diff --git a/SampleTest/Properties/AssemblyInfo.cs b/SampleTest/Properties/AssemblyInfo.cs deleted file mode 100644 index 67a172e..0000000 --- a/SampleTest/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SampleTest")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SampleTest")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: ComVisible(false)] \ No newline at end of file diff --git a/SampleTest/Properties/Default.rd.xml b/SampleTest/Properties/Default.rd.xml deleted file mode 100644 index af00722..0000000 --- a/SampleTest/Properties/Default.rd.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj index f99cc5f..d91416e 100644 --- a/SampleTest/SampleTest.csproj +++ b/SampleTest/SampleTest.csproj @@ -1,163 +1,29 @@ - - - + - Debug - x86 - {26F5807A-25B5-4E09-8C72-1749C4C59591} - AppContainerExe - Properties + WinExe + netcoreapp5.0 + 10.0.18362.0 SampleTest - SampleTest - en-US - UAP - 10.0.18362.0 - 10.0.17134.0 - 14 - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - true - false - true - WinUI-Alpha-Projects-Don-t-Use-SDK-Xaml-Tools - - - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x86 - false - prompt - true - - - bin\x86\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x86 - false - prompt - true - true - - - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - ARM - false - prompt - true - - - bin\ARM\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - ARM - false - prompt - true - true - - - true - bin\ARM64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - ARM64 - false - prompt - true - true - - - bin\ARM64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - ARM64 - false - prompt - true - true - - - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x64 - false - prompt - true - - - bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x64 - false - prompt - true - true - - - PackageReference + + x86;x64 + win10-x86;win10-x64 + + app.manifest - - App.xaml - - - MainPage.xaml - - + + - - Designer - + + - - - - - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - 6.2.9 - - 3.0.0-alpha.200210.0 + 3.0.0-preview1.200515.1-CI + + @@ -169,71 +35,9 @@ Microsoft.Toolkit.Graph - - 14.0 - - - bin\x86\CI\ - TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS - true - ;2008 - true - pdbonly - x86 - false - 7.3 - prompt - C:\code\Graph-Controls\Toolkit.ruleset - true - - - bin\ARM\CI\ - TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS - true - ;2008 - true - pdbonly - ARM - false - 7.3 - prompt - C:\code\Graph-Controls\Toolkit.ruleset - true - - - bin\ARM64\CI\ - TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS - true - ;2008 - true - pdbonly - ARM64 - false - 7.3 - prompt - C:\code\Graph-Controls\Toolkit.ruleset - true - - - bin\x64\CI\ - TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS - true - ;2008 - true - pdbonly - x64 - false - 7.3 - prompt - C:\code\Graph-Controls\Toolkit.ruleset - true - - - + + + MSBuild:Compile + + \ No newline at end of file diff --git a/SampleTest/app.manifest b/SampleTest/app.manifest new file mode 100644 index 0000000..fdfb130 --- /dev/null +++ b/SampleTest/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/Windows-Toolkit-Graph-Controls.sln b/Windows-Toolkit-Graph-Controls.sln index 3ee888b..16f029b 100644 --- a/Windows-Toolkit-Graph-Controls.sln +++ b/Windows-Toolkit-Graph-Controls.sln @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Config", "Build Confi azure-pipelines.yml = azure-pipelines.yml build\build.cake = build\build.cake build\build.ps1 = build\build.ps1 + build\CopyPri.targets = build\CopyPri.targets Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets global.json = global.json @@ -24,7 +25,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Config", "Build Confi version.json = version.json EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleTest", "SampleTest\SampleTest.csproj", "{26F5807A-25B5-4E09-8C72-1749C4C59591}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleTest", "SampleTest\SampleTest.csproj", "{26F5807A-25B5-4E09-8C72-1749C4C59591}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{68158E5B-0290-4153-A9DE-5AAC2DC0948F}" EndProject @@ -38,6 +39,8 @@ Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "WPF-Packaged-App", "Samples EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Toolkit.Wpf.Graph.Providers", "Microsoft.Toolkit.Wpf.Graph.Providers\Microsoft.Toolkit.Wpf.Graph.Providers.csproj", "{8B9BFE42-F526-4961-A1FD-2D2B6AA0C305}" EndProject +Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "SampleTest.Package", "SampleTest.Package\SampleTest.Package.wapproj", "{D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution CI|Any CPU = CI|Any CPU @@ -62,16 +65,16 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|Any CPU.ActiveCfg = CI|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|Any CPU.Build.0 = CI|Any CPU - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|ARM.ActiveCfg = CI|ARM - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|ARM.Build.0 = CI|ARM - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|ARM64.ActiveCfg = CI|ARM64 - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|ARM64.Build.0 = CI|ARM64 - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|x64.ActiveCfg = CI|x64 - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|x64.Build.0 = CI|x64 - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|x86.ActiveCfg = CI|x86 - {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|x86.Build.0 = CI|x86 + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|Any CPU.ActiveCfg = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|Any CPU.Build.0 = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|ARM.ActiveCfg = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|ARM.Build.0 = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|ARM64.ActiveCfg = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|ARM64.Build.0 = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|x64.ActiveCfg = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|x64.Build.0 = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|x86.ActiveCfg = Release|Any CPU + {B2246169-0CD8-473C-AFF6-172310E2C3F6}.CI|x86.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|Any CPU.Build.0 = Debug|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -102,16 +105,16 @@ Global {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|x64.Build.0 = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|x86.ActiveCfg = Release|Any CPU {B2246169-0CD8-473C-AFF6-172310E2C3F6}.Release|x86.Build.0 = Release|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|Any CPU.ActiveCfg = CI|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|Any CPU.Build.0 = CI|Any CPU - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|ARM.ActiveCfg = CI|ARM - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|ARM.Build.0 = CI|ARM - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|ARM64.ActiveCfg = CI|ARM64 - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|ARM64.Build.0 = CI|ARM64 - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|x64.ActiveCfg = CI|x64 - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|x64.Build.0 = CI|x64 - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|x86.ActiveCfg = CI|x86 - {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|x86.Build.0 = CI|x86 + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|Any CPU.ActiveCfg = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|Any CPU.Build.0 = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|ARM.ActiveCfg = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|ARM.Build.0 = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|ARM64.ActiveCfg = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|ARM64.Build.0 = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|x64.ActiveCfg = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|x64.Build.0 = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|x86.ActiveCfg = Release|Any CPU + {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.CI|x86.Build.0 = Release|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|Any CPU.Build.0 = Debug|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -142,20 +145,20 @@ Global {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|x64.Build.0 = Release|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|x86.ActiveCfg = Release|Any CPU {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|x86.Build.0 = Release|Any CPU - {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|Any CPU.ActiveCfg = CI|x86 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|ARM.ActiveCfg = CI|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|ARM64.ActiveCfg = CI|ARM64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|x64.ActiveCfg = CI|x64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|x86.ActiveCfg = CI|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|Any CPU.ActiveCfg = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|ARM.ActiveCfg = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|ARM.Build.0 = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|ARM64.ActiveCfg = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|ARM64.Build.0 = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|x64.ActiveCfg = Release|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|x64.Build.0 = Release|x64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|x86.ActiveCfg = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|x86.Build.0 = Release|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|Any CPU.ActiveCfg = Debug|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|Any CPU.Build.0 = Debug|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|Any CPU.Deploy.0 = Debug|x86 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM.ActiveCfg = Debug|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM.Build.0 = Debug|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM.Deploy.0 = Debug|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM64.Build.0 = Debug|ARM64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM.ActiveCfg = Debug|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|ARM64.ActiveCfg = Debug|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x64.ActiveCfg = Debug|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x64.Build.0 = Debug|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x64.Deploy.0 = Debug|x64 @@ -163,17 +166,15 @@ Global {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x86.Build.0 = Debug|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|x86.Deploy.0 = Debug|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|Any CPU.ActiveCfg = Release|x64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM.ActiveCfg = Release|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM64.ActiveCfg = Release|ARM64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM.ActiveCfg = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM.Build.0 = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM64.ActiveCfg = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|ARM64.Build.0 = Release|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x64.ActiveCfg = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Native|x86.ActiveCfg = Release|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|Any CPU.ActiveCfg = Release|x86 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM.ActiveCfg = Release|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM.Build.0 = Release|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM.Deploy.0 = Release|ARM - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM64.ActiveCfg = Release|ARM64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM64.Build.0 = Release|ARM64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM64.Deploy.0 = Release|ARM64 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM.ActiveCfg = Release|x86 + {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|ARM64.ActiveCfg = Release|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x64.ActiveCfg = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x64.Build.0 = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Release|x64.Deploy.0 = Release|x64 @@ -351,6 +352,64 @@ Global {8B9BFE42-F526-4961-A1FD-2D2B6AA0C305}.Release|x64.Build.0 = Release|Any CPU {8B9BFE42-F526-4961-A1FD-2D2B6AA0C305}.Release|x86.ActiveCfg = Release|Any CPU {8B9BFE42-F526-4961-A1FD-2D2B6AA0C305}.Release|x86.Build.0 = Release|Any CPU + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|Any CPU.ActiveCfg = Debug|Any CPU + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM.ActiveCfg = Release|ARM + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM.Build.0 = Release|ARM + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM.Deploy.0 = Release|ARM + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM64.ActiveCfg = Release|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM64.Build.0 = Release|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM64.Deploy.0 = Release|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|x64.ActiveCfg = Release|x64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|x64.Build.0 = Release|x64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|x64.Deploy.0 = Release|x64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|x86.ActiveCfg = Release|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|x86.Build.0 = Release|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|x86.Deploy.0 = Release|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM.ActiveCfg = Debug|ARM + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM.Build.0 = Debug|ARM + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM.Deploy.0 = Debug|ARM + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM64.Build.0 = Debug|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|x64.ActiveCfg = Debug|x64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|x64.Build.0 = Debug|x64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|x64.Deploy.0 = Debug|x64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|x86.ActiveCfg = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|x86.Build.0 = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|x86.Deploy.0 = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|Any CPU.ActiveCfg = Debug|Any CPU + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|Any CPU.Build.0 = Debug|Any CPU + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|Any CPU.Deploy.0 = Debug|Any CPU + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM.ActiveCfg = Release|ARM + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM.Build.0 = Release|ARM + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM.Deploy.0 = Release|ARM + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM64.ActiveCfg = Release|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM64.Build.0 = Release|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM64.Deploy.0 = Release|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|x64.ActiveCfg = Release|x64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|x64.Build.0 = Release|x64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|x64.Deploy.0 = Release|x64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|x86.ActiveCfg = Release|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|x86.Build.0 = Release|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|x86.Deploy.0 = Release|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|Any CPU.Build.0 = Release|Any CPU + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|Any CPU.Deploy.0 = Release|Any CPU + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM.ActiveCfg = Release|ARM + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM.Build.0 = Release|ARM + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM.Deploy.0 = Release|ARM + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM64.ActiveCfg = Release|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM64.Build.0 = Release|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM64.Deploy.0 = Release|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|x64.ActiveCfg = Release|x64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|x64.Build.0 = Release|x64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|x64.Deploy.0 = Release|x64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|x86.ActiveCfg = Release|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|x86.Build.0 = Release|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|x86.Deploy.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build/CopyPri.targets b/build/CopyPri.targets new file mode 100644 index 0000000..8aec8ca --- /dev/null +++ b/build/CopyPri.targets @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/build/build.cake b/build/build.cake index 34de89c..f2421b0 100644 --- a/build/build.cake +++ b/build/build.cake @@ -3,6 +3,8 @@ #addin nuget:?package=Cake.FileHelpers&version=3.2.1 #addin nuget:?package=Cake.Powershell&version=0.4.8 +#tool nuget:?package=vswhere&version=2.8.4 + using System; using System.Linq; using System.Text.RegularExpressions; @@ -91,6 +93,19 @@ void VerifyHeaders(bool Replace) } } +void UpdateToolsPath(MSBuildSettings buildSettings) +{ + // Workaround for https://github.com/cake-build/cake/issues/2128 + var vsInstallation = VSWhereLatest(new VSWhereLatestSettings { Requires = "Microsoft.Component.MSBuild", IncludePrerelease = false }); + + if (vsInstallation != null) + { + buildSettings.ToolPath = vsInstallation.CombineWithFilePath(@"MSBuild\Current\Bin\MSBuild.exe"); + if (!FileExists(buildSettings.ToolPath)) + buildSettings.ToolPath = vsInstallation.CombineWithFilePath(@"MSBuild\15.0\Bin\MSBuild.exe"); + } +} + ////////////////////////////////////////////////////////////////////// // DEFAULT TASK ////////////////////////////////////////////////////////////////////// @@ -153,6 +168,8 @@ Task("Build") .SetConfiguration("CI") .WithTarget("Restore"); + UpdateToolsPath(buildSettings); + MSBuild(Solution, buildSettings); EnsureDirectoryExists(nupkgDir); @@ -166,6 +183,8 @@ Task("Build") .WithTarget("Build") .WithProperty("GenerateLibraryLayout", "true"); + UpdateToolsPath(buildSettings); + MSBuild(Solution, buildSettings); }); @@ -212,6 +231,8 @@ Task("Package") .WithProperty("GenerateLibraryLayout", "true") .WithProperty("PackageOutputPath", nupkgDir); + UpdateToolsPath(buildSettings); + MSBuild(Solution, buildSettings); }); diff --git a/nuget.config b/nuget.config index 0718eda..a12c8d2 100644 --- a/nuget.config +++ b/nuget.config @@ -1,7 +1,16 @@ - - - + + + + + + + + + + + + \ No newline at end of file From f1f4f107b797b3f56f5df99801fda3e1490af27c Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Sun, 17 May 2020 23:51:03 -0700 Subject: [PATCH 07/21] Fixed azure pipeline. --- Windows-Toolkit-Graph-Controls.sln | 61 +++++++++--------------------- azure-pipelines.yml | 22 ++++++++++- global.json | 5 --- nuget.config | 2 + 4 files changed, 40 insertions(+), 50 deletions(-) delete mode 100644 global.json diff --git a/Windows-Toolkit-Graph-Controls.sln b/Windows-Toolkit-Graph-Controls.sln index 16f029b..15eff7e 100644 --- a/Windows-Toolkit-Graph-Controls.sln +++ b/Windows-Toolkit-Graph-Controls.sln @@ -17,7 +17,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Config", "Build Confi build\CopyPri.targets = build\CopyPri.targets Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets - global.json = global.json build\header.txt = build\header.txt nuget.config = nuget.config settings.xamlstyler = settings.xamlstyler @@ -147,13 +146,9 @@ Global {42252EE8-7E68-428F-972B-6D2DD3AA12CC}.Release|x86.Build.0 = Release|Any CPU {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|Any CPU.ActiveCfg = Release|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|ARM.ActiveCfg = Release|x86 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|ARM.Build.0 = Release|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|ARM64.ActiveCfg = Release|x86 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|ARM64.Build.0 = Release|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|x64.ActiveCfg = Release|x64 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|x64.Build.0 = Release|x64 {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|x86.ActiveCfg = Release|x86 - {26F5807A-25B5-4E09-8C72-1749C4C59591}.CI|x86.Build.0 = Release|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|Any CPU.ActiveCfg = Debug|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|Any CPU.Build.0 = Debug|x86 {26F5807A-25B5-4E09-8C72-1749C4C59591}.Debug|Any CPU.Deploy.0 = Debug|x86 @@ -352,58 +347,38 @@ Global {8B9BFE42-F526-4961-A1FD-2D2B6AA0C305}.Release|x64.Build.0 = Release|Any CPU {8B9BFE42-F526-4961-A1FD-2D2B6AA0C305}.Release|x86.ActiveCfg = Release|Any CPU {8B9BFE42-F526-4961-A1FD-2D2B6AA0C305}.Release|x86.Build.0 = Release|Any CPU - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|Any CPU.ActiveCfg = Debug|Any CPU - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM.ActiveCfg = Release|ARM - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM.Build.0 = Release|ARM - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM.Deploy.0 = Release|ARM - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM64.ActiveCfg = Release|ARM64 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM64.Build.0 = Release|ARM64 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM64.Deploy.0 = Release|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|Any CPU.ActiveCfg = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM.ActiveCfg = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|ARM64.ActiveCfg = Debug|x86 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|x64.ActiveCfg = Release|x64 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|x64.Build.0 = Release|x64 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|x64.Deploy.0 = Release|x64 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|x86.ActiveCfg = Release|x86 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|x86.Build.0 = Release|x86 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.CI|x86.Deploy.0 = Release|x86 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM.ActiveCfg = Debug|ARM - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM.Build.0 = Debug|ARM - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM.Deploy.0 = Debug|ARM - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM64.Build.0 = Debug|ARM64 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|Any CPU.ActiveCfg = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM.ActiveCfg = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|ARM64.ActiveCfg = Debug|x86 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|x64.ActiveCfg = Debug|x64 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|x64.Build.0 = Debug|x64 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|x64.Deploy.0 = Debug|x64 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|x86.ActiveCfg = Debug|x86 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|x86.Build.0 = Debug|x86 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Debug|x86.Deploy.0 = Debug|x86 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|Any CPU.ActiveCfg = Debug|Any CPU - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|Any CPU.Build.0 = Debug|Any CPU - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|Any CPU.Deploy.0 = Debug|Any CPU - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM.ActiveCfg = Release|ARM - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM.Build.0 = Release|ARM - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM.Deploy.0 = Release|ARM - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM64.ActiveCfg = Release|ARM64 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM64.Build.0 = Release|ARM64 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM64.Deploy.0 = Release|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|Any CPU.ActiveCfg = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|Any CPU.Build.0 = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|Any CPU.Deploy.0 = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM.ActiveCfg = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM.Build.0 = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM.Deploy.0 = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM64.ActiveCfg = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM64.Build.0 = Debug|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|ARM64.Deploy.0 = Debug|x86 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|x64.ActiveCfg = Release|x64 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|x64.Build.0 = Release|x64 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|x64.Deploy.0 = Release|x64 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|x86.ActiveCfg = Release|x86 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|x86.Build.0 = Release|x86 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Native|x86.Deploy.0 = Release|x86 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|Any CPU.Build.0 = Release|Any CPU - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|Any CPU.Deploy.0 = Release|Any CPU - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM.ActiveCfg = Release|ARM - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM.Build.0 = Release|ARM - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM.Deploy.0 = Release|ARM - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM64.ActiveCfg = Release|ARM64 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM64.Build.0 = Release|ARM64 - {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM64.Deploy.0 = Release|ARM64 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|Any CPU.ActiveCfg = Release|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM.ActiveCfg = Release|x86 + {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|ARM64.ActiveCfg = Release|x86 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|x64.ActiveCfg = Release|x64 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|x64.Build.0 = Release|x64 {D67EBA45-B0CD-4BEF-A2D9-6BADA1B47D78}.Release|x64.Deploy.0 = Release|x64 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f45fa4e..44e6571 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,9 +26,15 @@ steps: # Install Nuget Tool Installer - task: NuGetToolInstaller@0 - displayName: Use NuGet 5.0.0 + displayName: Use NuGet 5.5.1 inputs: - versionSpec: 5.0.0 + versionSpec: 5.5.1 + +- task: NuGetAuthenticate@0 + displayName: 'NuGet Authenticate' + inputs: + nuGetServiceConnections: WinUI.Dependencies,VS + forceReinstallCredentialProvider: true # Install NBGV Tool - task: DotNetCoreCLI@2 @@ -46,6 +52,18 @@ steps: - powershell: .\build\Install-WindowsSdkISO.ps1 18362 displayName: Insider SDK +- powershell: | + Write-Host "##vso[task.setvariable variable=PATH;]${env:LocalAppData}\Microsoft\dotnet;${env:PATH}"; + + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; + + dotnet new globaljson --sdk-version "$($env:NET5_SDK_VERSION)" + + &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version "$($env:NET5_SDK_VERSION)" -Architecture "x64" -AzureFeed "$($env:NET5_SDK_FEED)" + + failOnStderr: true + displayName: 'Install .NET 5 SDK' + # Run cake build - powershell: .\build.ps1 -target=Package displayName: Build diff --git a/global.json b/global.json deleted file mode 100644 index 80d84a2..0000000 --- a/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "msbuild-sdks": { - "MSBuild.Sdk.Extras": "2.0.54" - } -} \ No newline at end of file diff --git a/nuget.config b/nuget.config index a12c8d2..4397c66 100644 --- a/nuget.config +++ b/nuget.config @@ -10,6 +10,8 @@ + + From ed6f2ae0f15412797dd208f7a07226f324cac3ea Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Mon, 18 May 2020 23:52:43 -0700 Subject: [PATCH 08/21] Minor fix on nuget.config --- nuget.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nuget.config b/nuget.config index 19570ba..a3300b9 100644 --- a/nuget.config +++ b/nuget.config @@ -9,7 +9,7 @@ - - + + \ No newline at end of file From 3c2f904cba7b70b798a89a217ce2b714a53a3dba Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Mon, 18 May 2020 23:55:13 -0700 Subject: [PATCH 09/21] Updated dependencies to 8.0.0-preview1. --- .../Microsoft.Toolkit.Graph.Controls.csproj | 4 ++-- Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 7e110f6..42813be 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -41,8 +41,8 @@ - - + + 3.0.0-preview1.200515.3 diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index 326eb85..62c13a1 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -14,6 +14,6 @@ - + From b8306b2873ce1fd70aaf9fe1c5316789f1640dd7 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Tue, 30 Jun 2020 16:32:41 -0700 Subject: [PATCH 10/21] Updated TFM to net5.0. --- .../Microsoft.Toolkit.Graph.Controls.csproj | 14 +- .../Microsoft.Toolkit.Graph.csproj | 2 +- SampleTest.Package/SampleTest.Package.wapproj | 6 +- .../build/LiftedWinRTClassRegistrations.xml | 950 +----------------- SampleTest/SampleTest.csproj | 6 +- build/CopyPri.targets | 2 +- nuget.config | 10 +- 7 files changed, 26 insertions(+), 964 deletions(-) diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index e2c8c3b..ef151b3 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -1,7 +1,7 @@  - netcoreapp5.0 + net5.0 Windows Community Toolkit Graph Controls Microsoft.Toolkit.Graph.Controls @@ -19,7 +19,7 @@ - + @@ -35,17 +35,17 @@ - + - + - - + + - 3.0.0-preview1.200515.3 + 3.0.0-preview1.200629.2-CI diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index 3bd880d..8004141 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -14,6 +14,6 @@ - + diff --git a/SampleTest.Package/SampleTest.Package.wapproj b/SampleTest.Package/SampleTest.Package.wapproj index e2cb852..ac0e242 100644 --- a/SampleTest.Package/SampleTest.Package.wapproj +++ b/SampleTest.Package/SampleTest.Package.wapproj @@ -59,5 +59,9 @@ - + + $(MSBuildThisFileDirectory)build\ + ..\SampleTest\SampleTest.csproj + + \ No newline at end of file diff --git a/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml b/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml index 5340f34..ff6d97e 100644 --- a/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml +++ b/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml @@ -2,236 +2,33 @@ dcompi.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -240,146 +37,47 @@ CoreMessagingXP.dll - - - - - Microsoft.UI.Input.dll - - - - - - - - - - - - - - Microsoft.UI.Xaml.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -390,46 +88,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -446,24 +118,18 @@ - - - - - - @@ -474,17 +140,12 @@ - - - - - @@ -526,74 +187,26 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -601,7 +214,6 @@ - @@ -612,11 +224,9 @@ - - @@ -625,7 +235,6 @@ - @@ -634,7 +243,6 @@ - @@ -642,9 +250,7 @@ - - @@ -676,227 +282,69 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -907,24 +355,17 @@ - - - - - - - @@ -976,25 +417,17 @@ - - - - - - - - @@ -1020,123 +453,23 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1159,8 +492,6 @@ - - @@ -1195,9 +526,6 @@ - - - @@ -1206,32 +534,14 @@ - - - - - - - - - - - - - - - - - - @@ -1239,83 +549,21 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1324,10 +572,6 @@ - - - - @@ -1337,41 +581,18 @@ Microsoft.UI.Xaml.Controls.dll - - - - - - - - - - - - - - - - - - - - - - - @@ -1380,10 +601,6 @@ - - - - @@ -1392,89 +609,26 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1482,75 +636,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1558,35 +673,18 @@ - - - - - - - - - - - - - - - - - @@ -1597,34 +695,16 @@ - - - - - - - - - - - - - - - - - - @@ -1632,17 +712,9 @@ - - - - - - - - @@ -1650,10 +722,6 @@ Microsoft.UI.Xaml.Phone.dll - - - - @@ -1673,29 +741,25 @@ - - - - - - - - - - - + + + + + WinUIEdit.dll + + \ No newline at end of file diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj index d91416e..bece237 100644 --- a/SampleTest/SampleTest.csproj +++ b/SampleTest/SampleTest.csproj @@ -1,7 +1,7 @@  WinExe - netcoreapp5.0 + net5.0 10.0.18362.0 SampleTest @@ -20,10 +20,10 @@ - 3.0.0-preview1.200515.1-CI + 3.0.0-preview1.200629.2-CI - + diff --git a/build/CopyPri.targets b/build/CopyPri.targets index 8aec8ca..ddf7849 100644 --- a/build/CopyPri.targets +++ b/build/CopyPri.targets @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/nuget.config b/nuget.config index a3300b9..613e19b 100644 --- a/nuget.config +++ b/nuget.config @@ -1,15 +1,9 @@ - - - - - - - - + + \ No newline at end of file From 3893aff249c44bf9ac39cb8f4b4822bb7803433c Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Tue, 30 Jun 2020 16:47:25 -0700 Subject: [PATCH 11/21] Small version update on dependency. --- .../Microsoft.Toolkit.Graph.Controls.csproj | 4 ++-- Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index ef151b3..282d142 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -41,8 +41,8 @@ - - + + 3.0.0-preview1.200629.2-CI diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index 8004141..096aab1 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -14,6 +14,6 @@ - + From d2ac5272201146584d69258ad06adf3641a7b235 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Wed, 1 Jul 2020 14:47:10 -0700 Subject: [PATCH 12/21] Updated to new version of WinUI. --- Directory.Build.props | 1 - .../Microsoft.Toolkit.Graph.Controls.csproj | 34 ++++++------------- .../Microsoft.Toolkit.Graph.csproj | 2 +- SampleTest.Package/SampleTest.Package.wapproj | 7 ++++ SampleTest/SampleTest.csproj | 2 +- Windows-Toolkit-Graph-Controls.sln | 1 - build/CopyPri.targets | 5 --- 7 files changed, 20 insertions(+), 32 deletions(-) delete mode 100644 build/CopyPri.targets diff --git a/Directory.Build.props b/Directory.Build.props index 3fd6f62..53d76b1 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -61,7 +61,6 @@ true - false diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 282d142..2305308 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -13,8 +13,6 @@ - PeoplePicker: The PeoplePicker Control is a simple control that allows for selection of one or more users. UWP Toolkit Windows Controls MSAL Microsoft Graph AadLogin ProfileCard Person PeoplePicker Login - - false uap10.0.$(DefaultTargetPlatformMinVersion) @@ -22,32 +20,22 @@ - - - true - lib\$(TargetFramework)\$(AssemblyName) - - - - - true - lib\$(TargetFramework)\$(AssemblyName)\$(AssemblyName).xr.xml - - - - - - - - + - - + + - 3.0.0-preview1.200629.2-CI + 3.0.0-preview2.200701.0-CI + + + + + <_AllChildProjectItemsWithTargetPath Remove="@(_AllChildProjectItemsWithTargetPath)" Condition="$([System.String]::new('%(Identity)').EndsWith('.xr.xml'))"/> + + diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index 096aab1..658a4c1 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -14,6 +14,6 @@ - + diff --git a/SampleTest.Package/SampleTest.Package.wapproj b/SampleTest.Package/SampleTest.Package.wapproj index ac0e242..7b83b91 100644 --- a/SampleTest.Package/SampleTest.Package.wapproj +++ b/SampleTest.Package/SampleTest.Package.wapproj @@ -63,5 +63,12 @@ $(MSBuildThisFileDirectory)build\ ..\SampleTest\SampleTest.csproj + + + + + + + \ No newline at end of file diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj index bece237..9bf6e59 100644 --- a/SampleTest/SampleTest.csproj +++ b/SampleTest/SampleTest.csproj @@ -20,7 +20,7 @@ - 3.0.0-preview1.200629.2-CI + 3.0.0-preview2.200701.0-CI diff --git a/Windows-Toolkit-Graph-Controls.sln b/Windows-Toolkit-Graph-Controls.sln index 15eff7e..02d2e2c 100644 --- a/Windows-Toolkit-Graph-Controls.sln +++ b/Windows-Toolkit-Graph-Controls.sln @@ -14,7 +14,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Config", "Build Confi azure-pipelines.yml = azure-pipelines.yml build\build.cake = build\build.cake build\build.ps1 = build\build.ps1 - build\CopyPri.targets = build\CopyPri.targets Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets build\header.txt = build\header.txt diff --git a/build/CopyPri.targets b/build/CopyPri.targets deleted file mode 100644 index ddf7849..0000000 --- a/build/CopyPri.targets +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file From 066702e691221feab49d2774a1a1cc210bce6e76 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Tue, 7 Jul 2020 17:31:17 -0700 Subject: [PATCH 13/21] Updated to new version of WinUI. --- .../Microsoft.Toolkit.Graph.Controls.csproj | 14 +++----------- .../Microsoft.Toolkit.Graph.csproj | 2 +- SampleTest.Package/SampleTest.Package.wapproj | 12 +----------- .../build/Microsoft.WinUI.AppX.targets | 12 ++++++++++++ SampleTest/SampleTest.csproj | 2 +- 5 files changed, 18 insertions(+), 24 deletions(-) diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 2305308..ec0e8ed 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -18,25 +18,17 @@ - - - + + - 3.0.0-preview2.200701.0-CI + 3.0.0-preview2.200707.3-CI - - - - <_AllChildProjectItemsWithTargetPath Remove="@(_AllChildProjectItemsWithTargetPath)" Condition="$([System.String]::new('%(Identity)').EndsWith('.xr.xml'))"/> - - - diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index 658a4c1..799d70d 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -14,6 +14,6 @@ - + diff --git a/SampleTest.Package/SampleTest.Package.wapproj b/SampleTest.Package/SampleTest.Package.wapproj index 7b83b91..3469431 100644 --- a/SampleTest.Package/SampleTest.Package.wapproj +++ b/SampleTest.Package/SampleTest.Package.wapproj @@ -32,6 +32,7 @@ 10.0.17134.0 en-US false + $(MSBuildThisFileDirectory)build\ ..\SampleTest\SampleTest.csproj @@ -59,16 +60,5 @@ - - $(MSBuildThisFileDirectory)build\ - ..\SampleTest\SampleTest.csproj - - - - - - - - \ No newline at end of file diff --git a/SampleTest.Package/build/Microsoft.WinUI.AppX.targets b/SampleTest.Package/build/Microsoft.WinUI.AppX.targets index f728cf1..efa7274 100644 --- a/SampleTest.Package/build/Microsoft.WinUI.AppX.targets +++ b/SampleTest.Package/build/Microsoft.WinUI.AppX.targets @@ -166,5 +166,17 @@ + + + + + + + diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj index 9bf6e59..fd7e50d 100644 --- a/SampleTest/SampleTest.csproj +++ b/SampleTest/SampleTest.csproj @@ -20,7 +20,7 @@ - 3.0.0-preview2.200701.0-CI + 3.0.0-preview2.200707.3-CI From a14dfa0d9ebe677c867a63aa797e097779d2c06b Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Wed, 15 Jul 2020 11:48:38 -0700 Subject: [PATCH 14/21] Updated to WinUI3-preview2. --- Directory.Build.props | 4 ++++ .../Microsoft.Toolkit.Graph.Controls.csproj | 6 +++--- Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj | 2 +- SampleTest/SampleTest.csproj | 2 +- build/build.cake | 4 +--- nuget.config | 2 -- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 53d76b1..90d8a2f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -23,6 +23,10 @@ CS8002;CS8305 + + true + + true $(MSBuildThisFileDirectory)toolkit.snk diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index ec0e8ed..a342697 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -21,11 +21,11 @@ - - + + - 3.0.0-preview2.200707.3-CI + 3.0.0-preview2.200713.0 diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index 799d70d..72dc6bc 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -14,6 +14,6 @@ - + diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj index fd7e50d..8b7d88e 100644 --- a/SampleTest/SampleTest.csproj +++ b/SampleTest/SampleTest.csproj @@ -20,7 +20,7 @@ - 3.0.0-preview2.200707.3-CI + 3.0.0-preview2.200713.0 diff --git a/build/build.cake b/build/build.cake index 7033b40..1876829 100644 --- a/build/build.cake +++ b/build/build.cake @@ -180,8 +180,7 @@ Task("Build") MaxCpuCount = 0 } .SetConfiguration("CI") - .WithTarget("Build") - .WithProperty("GenerateLibraryLayout", "true"); + .WithTarget("Build"); UpdateToolsPath(buildSettings); @@ -228,7 +227,6 @@ Task("Package") } .SetConfiguration("CI") .WithTarget("Pack") - .WithProperty("GenerateLibraryLayout", "true") .WithProperty("PackageOutputPath", nupkgDir); UpdateToolsPath(buildSettings); diff --git a/nuget.config b/nuget.config index 613e19b..2e84a9c 100644 --- a/nuget.config +++ b/nuget.config @@ -3,7 +3,5 @@ - - \ No newline at end of file From 19c10f9260fb1b20a8a2fe46d76dcd885c16f5f2 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Thu, 20 Aug 2020 12:05:09 -0700 Subject: [PATCH 15/21] Fixed .Net 5 Preview5 version --- global.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/global.json b/global.json index 7025f06..ec3a812 100644 --- a/global.json +++ b/global.json @@ -1,4 +1,7 @@ { + "sdk": { + "version": "5.0.100-preview.5.20279.10" + }, "msbuild-sdks": { "MSBuild.Sdk.Extras": "2.1.2" } From 907825c9ec4a375a95dc8e4722cb3148ff95e4a4 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Wed, 14 Oct 2020 15:42:05 -0700 Subject: [PATCH 16/21] Updated to new version of WinUI --- Directory.Build.props | 2 +- .../Microsoft.Toolkit.Graph.Controls.csproj | 17 ++- .../Microsoft.Toolkit.Graph.csproj | 2 +- .../Providers/ProviderManager.cs | 3 - SampleTest.Package/SampleTest.Package.wapproj | 11 +- .../build/LiftedWinRTClassRegistrations.xml | 67 ++++++++---- .../build/Microsoft.WinUI.AppX.targets | 103 ++++++++++-------- SampleTest/App.xaml.cs | 10 ++ SampleTest/SampleTest.csproj | 11 +- build/build.cake | 2 +- global.json | 3 - nuget.config | 2 +- 12 files changed, 137 insertions(+), 96 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index aebd294..04fa639 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -15,7 +15,7 @@ $(MSBuildProjectName.Contains('Test')) $(MSBuildProjectName.Contains('Sample')) $(MSBuildProjectName.Contains('Wpf')) - 18362 + 19041 17134 10.0.$(DefaultTargetPlatformVersion).0 10.0.$(DefaultTargetPlatformMinVersion).0 diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 6ff5bd1..26613d0 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -1,7 +1,7 @@  - net5.0 + net5.0-windows10.0.19041.0 Windows Community Toolkit Graph Controls Microsoft.Toolkit.Graph.Controls @@ -13,20 +13,15 @@ - PeoplePicker: The PeoplePicker Control is a simple control that allows for selection of one or more users. UWP Toolkit Windows Controls MSAL Microsoft Graph AadLogin ProfileCard Person PeoplePicker Login - uap10.0.$(DefaultTargetPlatformMinVersion) 8.0 - - - - - - + + - 3.0.0-preview2.200713.0 + 3.0.0-development.201009.6-CI @@ -42,7 +37,9 @@ true - lib\$(TargetFramework)\$(AssemblyName)\Assets\person.png + + + lib\net5.0-windows10.0.19041\$(AssemblyName)\Assets\person.png diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index d2dc0b5..ca49a9a 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -14,6 +14,6 @@ - + diff --git a/Microsoft.Toolkit.Graph/Providers/ProviderManager.cs b/Microsoft.Toolkit.Graph/Providers/ProviderManager.cs index f585ef5..e417de0 100644 --- a/Microsoft.Toolkit.Graph/Providers/ProviderManager.cs +++ b/Microsoft.Toolkit.Graph/Providers/ProviderManager.cs @@ -4,9 +4,6 @@ using System; using System.ComponentModel; -using Microsoft.Graph; -using Microsoft.Identity.Client; -using Microsoft.Toolkit.Helpers; namespace Microsoft.Toolkit.Graph.Providers { diff --git a/SampleTest.Package/SampleTest.Package.wapproj b/SampleTest.Package/SampleTest.Package.wapproj index 3469431..0a8bd93 100644 --- a/SampleTest.Package/SampleTest.Package.wapproj +++ b/SampleTest.Package/SampleTest.Package.wapproj @@ -20,6 +20,14 @@ Release x64 + + Debug + ARM64 + + + Release + ARM64 + $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\ @@ -28,7 +36,7 @@ d67eba45-b0cd-4bef-a2d9-6bada1b47d78 - 10.0.18362.0 + 10.0.19041.0 10.0.17134.0 en-US false @@ -52,6 +60,7 @@ True + Properties\PublishProfiles\win10-$(Platform).pubxml diff --git a/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml b/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml index ff6d97e..dd10b4e 100644 --- a/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml +++ b/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml @@ -1,19 +1,29 @@  + + + CoreMessagingXP.dll + + + + dcompi.dll + + - - + + + @@ -21,6 +31,9 @@ + + + @@ -28,32 +41,35 @@ - - - CoreMessagingXP.dll - - + Microsoft.UI.Input.dll + + + + + + + + + + + + + + + + + + - Microsoft.UI.Input.dll - - - - - - - - - - - - + DCompi.dll + @@ -187,7 +203,6 @@ - @@ -325,7 +340,6 @@ - @@ -556,7 +570,6 @@ - @@ -762,4 +775,12 @@ + + + Microsoft.Web.WebView2.Core.dll + + + + + \ No newline at end of file diff --git a/SampleTest.Package/build/Microsoft.WinUI.AppX.targets b/SampleTest.Package/build/Microsoft.WinUI.AppX.targets index efa7274..8686019 100644 --- a/SampleTest.Package/build/Microsoft.WinUI.AppX.targets +++ b/SampleTest.Package/build/Microsoft.WinUI.AppX.targets @@ -2,21 +2,26 @@ Copyright (c) Microsoft Corporation. Licensed under the MIT License --> - + - + $(MSBuildThisFileDirectory) - + - @@ -35,14 +40,14 @@ - - $(MSBuildWarningsAsMessages);APPX1707 + + $(MSBuildWarningsAsMessages); + + + APPX1707; + + + $(MSBuildWarningsAsMessages); + + + MSB3268; + + + + - UAP Windows 10.0 - - true - false en-US - - - - - - - @@ -149,15 +157,15 @@ - - - - %(WapProjPackageFile.DestinationSubDirectory)%(TargetPath) @@ -168,15 +176,18 @@ - - - - - + Add a dependency for the app against VCLibs since it doesn't come with .NET only apps. C++ apps + will already have this dependency, but duplicate referenes are a no-op so there's no need to + condition the dependency. + --> + + + + + + + + + + - diff --git a/SampleTest/App.xaml.cs b/SampleTest/App.xaml.cs index 9a2903e..44e16cd 100644 --- a/SampleTest/App.xaml.cs +++ b/SampleTest/App.xaml.cs @@ -4,6 +4,7 @@ using Windows.ApplicationModel; using Microsoft.UI.Xaml; +using System; namespace SampleTest { @@ -13,6 +14,15 @@ sealed partial class App public App() { + WinRT.ComWrappersSupport.RegisterProjectionAssembly(typeof(App).Assembly); + WinRT.ComWrappersSupport.RegisterProjectionAssembly(typeof(Microsoft.Xaml.Interactivity.Interaction).Assembly); + WinRT.ComWrappersSupport.RegisterProjectionAssembly(typeof(Microsoft.Xaml.Interactions.Core.CallMethodAction).Assembly); + + foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) + { + WinRT.ComWrappersSupport.RegisterProjectionAssembly(assembly); + } + this.InitializeComponent(); this.Suspending += OnSuspending; } diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj index 8b7d88e..914bb95 100644 --- a/SampleTest/SampleTest.csproj +++ b/SampleTest/SampleTest.csproj @@ -1,12 +1,12 @@  WinExe - net5.0 - 10.0.18362.0 + net5.0-windows10.0.19041.0 + 10.0.17134.0 SampleTest - x86;x64 - win10-x86;win10-x64 + x86;x64;arm64 + win10-x86;win10-x64;win10-arm64 app.manifest @@ -20,10 +20,9 @@ - 3.0.0-preview2.200713.0 + 3.0.0-development.201009.6-CI - diff --git a/build/build.cake b/build/build.cake index 189cdfb..1dfcef4 100644 --- a/build/build.cake +++ b/build/build.cake @@ -96,7 +96,7 @@ void VerifyHeaders(bool Replace) void UpdateToolsPath(MSBuildSettings buildSettings) { // Workaround for https://github.com/cake-build/cake/issues/2128 - var vsInstallation = VSWhereLatest(new VSWhereLatestSettings { Requires = "Microsoft.Component.MSBuild", IncludePrerelease = false }); + var vsInstallation = VSWhereLatest(new VSWhereLatestSettings { Requires = "Microsoft.Component.MSBuild", IncludePrerelease = true }); if (vsInstallation != null) { diff --git a/global.json b/global.json index ec3a812..7025f06 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,4 @@ { - "sdk": { - "version": "5.0.100-preview.5.20279.10" - }, "msbuild-sdks": { "MSBuild.Sdk.Extras": "2.1.2" } diff --git a/nuget.config b/nuget.config index 2e84a9c..40574a7 100644 --- a/nuget.config +++ b/nuget.config @@ -2,6 +2,6 @@ - + \ No newline at end of file From d752a39498b996c29d50999547829fc6bcf8deea Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Thu, 15 Oct 2020 14:32:21 -0700 Subject: [PATCH 17/21] Switched TFM to 18362. --- Directory.Build.props | 4 ++-- .../Controls/GraphPresenter/GraphPresenter.cs | 4 ++-- .../Microsoft.Toolkit.Graph.Controls.csproj | 12 ++++++------ .../Microsoft.Toolkit.Graph.csproj | 6 +++++- SampleTest.Package/SampleTest.Package.wapproj | 2 +- SampleTest/App.xaml.cs | 9 --------- SampleTest/SampleTest.csproj | 5 +++-- 7 files changed, 19 insertions(+), 23 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 04fa639..0ab37c5 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -15,7 +15,7 @@ $(MSBuildProjectName.Contains('Test')) $(MSBuildProjectName.Contains('Sample')) $(MSBuildProjectName.Contains('Wpf')) - 19041 + 18362 17134 10.0.$(DefaultTargetPlatformVersion).0 10.0.$(DefaultTargetPlatformMinVersion).0 @@ -64,7 +64,7 @@ - true + false diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/GraphPresenter/GraphPresenter.cs b/Microsoft.Toolkit.Graph.Controls/Controls/GraphPresenter/GraphPresenter.cs index 647aa10..bcd2e70 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/GraphPresenter/GraphPresenter.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/GraphPresenter/GraphPresenter.cs @@ -8,7 +8,7 @@ using System.Threading; using Microsoft.Graph; using Microsoft.System; -using Microsoft.Toolkit.Uwp.Helpers; +using Microsoft.Toolkit.Uwp.Extensions; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Newtonsoft.Json.Linq; @@ -104,7 +104,7 @@ private async void GraphPresenter_Loaded(object sender, RoutedEventArgs e) data = values.ToObject(ResponseType); } - _ = DispatcherQueueHelper.ExecuteOnUIThreadAsync(dispatcherQueue, () => Content = data); + _ = dispatcherQueue.EnqueueAsync(() => Content = data); } catch { diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 26613d0..9abe84d 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -1,7 +1,7 @@  - net5.0-windows10.0.19041.0 + net5.0-windows10.0.18362.0 Windows Community Toolkit Graph Controls Microsoft.Toolkit.Graph.Controls @@ -17,14 +17,14 @@ - - + + - 3.0.0-development.201009.6-CI + 3.0.0-preview3.201105.2-nightly - + @@ -39,7 +39,7 @@ true - lib\net5.0-windows10.0.19041\$(AssemblyName)\Assets\person.png + lib\net5.0-windows10.0.18362\$(AssemblyName)\Assets\person.png diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index ca49a9a..7ca7387 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -14,6 +14,10 @@ - + + + + + diff --git a/SampleTest.Package/SampleTest.Package.wapproj b/SampleTest.Package/SampleTest.Package.wapproj index 0a8bd93..2ff6530 100644 --- a/SampleTest.Package/SampleTest.Package.wapproj +++ b/SampleTest.Package/SampleTest.Package.wapproj @@ -36,7 +36,7 @@ d67eba45-b0cd-4bef-a2d9-6bada1b47d78 - 10.0.19041.0 + 10.0.18362.0 10.0.17134.0 en-US false diff --git a/SampleTest/App.xaml.cs b/SampleTest/App.xaml.cs index 44e16cd..39ba513 100644 --- a/SampleTest/App.xaml.cs +++ b/SampleTest/App.xaml.cs @@ -14,15 +14,6 @@ sealed partial class App public App() { - WinRT.ComWrappersSupport.RegisterProjectionAssembly(typeof(App).Assembly); - WinRT.ComWrappersSupport.RegisterProjectionAssembly(typeof(Microsoft.Xaml.Interactivity.Interaction).Assembly); - WinRT.ComWrappersSupport.RegisterProjectionAssembly(typeof(Microsoft.Xaml.Interactions.Core.CallMethodAction).Assembly); - - foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) - { - WinRT.ComWrappersSupport.RegisterProjectionAssembly(assembly); - } - this.InitializeComponent(); this.Suspending += OnSuspending; } diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj index 914bb95..4a394bc 100644 --- a/SampleTest/SampleTest.csproj +++ b/SampleTest/SampleTest.csproj @@ -1,7 +1,7 @@  WinExe - net5.0-windows10.0.19041.0 + net5.0-windows10.0.18362.0 10.0.17134.0 SampleTest @@ -20,10 +20,11 @@ - 3.0.0-development.201009.6-CI + 3.0.0-preview3.201105.2-nightly + {42252ee8-7e68-428f-972b-6d2dd3aa12cc} From 1cd784b33ffab09fd419770e91a1d60dcc54cb80 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Fri, 11 Dec 2020 14:48:31 -0800 Subject: [PATCH 18/21] Updated to WinUI3 preview 3. --- .../Controls/PeoplePicker/PeoplePicker.cs | 8 +- .../Microsoft.Toolkit.Graph.Controls.csproj | 6 +- .../Microsoft.Toolkit.Graph.csproj | 2 +- .../build/LiftedWinRTClassRegistrations.xml | 786 ------------------ .../build/Microsoft.WinUI.AppX.targets | 139 ++-- SampleTest/SampleTest.csproj | 2 +- 6 files changed, 104 insertions(+), 839 deletions(-) delete mode 100644 SampleTest.Package/build/LiftedWinRTClassRegistrations.xml diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.cs b/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.cs index 9ac61b0..0194f40 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.cs @@ -7,6 +7,7 @@ using System.Collections.ObjectModel; using System.Linq; using Microsoft.Graph; +using Microsoft.System; using Microsoft.Toolkit.Graph.Extensions; using Microsoft.Toolkit.Graph.Providers; using Microsoft.Toolkit.Uwp.UI.Controls; @@ -21,7 +22,7 @@ namespace Microsoft.Toolkit.Graph.Controls /// public partial class PeoplePicker : TokenizingTextBox { - private DispatcherTimer _typeTimer = new DispatcherTimer(); + private DispatcherQueueTimer _typeTimer = null; /// /// Initializes a new instance of the class. @@ -71,6 +72,11 @@ private void TokenBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChang if (list != null) { + if (_typeTimer == null) + { + _typeTimer = DispatcherQueue.CreateTimer(); + } + _typeTimer.Debounce( async () => { diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index f492ed5..afbf744 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -17,11 +17,11 @@ - - + + - 3.0.0-preview3.201105.2-nightly + 3.0.0-preview3.201113.0 diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index 0c77093..22e6c63 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -14,7 +14,7 @@ - + diff --git a/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml b/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml deleted file mode 100644 index dd10b4e..0000000 --- a/SampleTest.Package/build/LiftedWinRTClassRegistrations.xml +++ /dev/null @@ -1,786 +0,0 @@ - - - - CoreMessagingXP.dll - - - - - - - dcompi.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Microsoft.UI.Input.dll - - - - - - - - - - - - - - - - - - - - - - - DCompi.dll - - - - - - Microsoft.UI.Xaml.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Microsoft.UI.Xaml.Controls.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Microsoft.UI.Xaml.Phone.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WinUIEdit.dll - - - - - - - Microsoft.Web.WebView2.Core.dll - - - - - - \ No newline at end of file diff --git a/SampleTest.Package/build/Microsoft.WinUI.AppX.targets b/SampleTest.Package/build/Microsoft.WinUI.AppX.targets index 8686019..756b0ca 100644 --- a/SampleTest.Package/build/Microsoft.WinUI.AppX.targets +++ b/SampleTest.Package/build/Microsoft.WinUI.AppX.targets @@ -2,44 +2,72 @@ Copyright (c) Microsoft Corporation. Licensed under the MIT License --> + + + + + + + + + + $(MSBuildThisFileDirectory) + + + $(WinUIClassRegistrationsDir.Substring(0,$(WinUIClassRegistrationsDir.IndexOf(';')))) + + + + - - - - - $(MSBuildThisFileDirectory) - - - + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + ]]> + + + - $(MSBuildWarningsAsMessages); + $(MSBuildWarningsAsMessages); - - APPX1707; + APPX1707; - $(MSBuildWarningsAsMessages); + $(MSBuildWarningsAsMessages); - - MSB3268; + MSB3268; @@ -183,11 +215,24 @@ - + + + + + + + UAP + + + diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj index 4a394bc..618bfaa 100644 --- a/SampleTest/SampleTest.csproj +++ b/SampleTest/SampleTest.csproj @@ -20,7 +20,7 @@ - 3.0.0-preview3.201105.2-nightly + 3.0.0-preview3.201113.0 From 15ee8c6e6672603fe17c90e524a60ffb2dea8060 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Fri, 5 Feb 2021 10:46:57 -0800 Subject: [PATCH 19/21] Updated WinUI to 3.0.0-preview4.210210.4. --- Directory.Build.props | 3 +- .../Controls/PeoplePicker/PeoplePicker.cs | 2 +- .../Microsoft.Toolkit.Graph.Controls.csproj | 7 +- .../Microsoft.Toolkit.Graph.csproj | 5 +- SampleTest.Package/SampleTest.Package.wapproj | 13 +- .../build/Microsoft.WinUI.AppX.targets | 167 ++++++++++-------- SampleTest/SampleTest.csproj | 3 +- azure-pipelines.yml | 20 +-- 8 files changed, 107 insertions(+), 113 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index aaa5aae..5b94f7f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -19,6 +19,7 @@ 17763 10.0.$(DefaultTargetPlatformVersion).0 10.0.$(DefaultTargetPlatformMinVersion).0 + $(TargetPlatformMinVersion) $(MSBuildThisFileDirectory)bin\nupkg CS8002;CS8305 @@ -64,7 +65,7 @@ - false + true diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.cs b/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.cs index 0194f40..bd93292 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/PeoplePicker/PeoplePicker.cs @@ -10,8 +10,8 @@ using Microsoft.System; using Microsoft.Toolkit.Graph.Extensions; using Microsoft.Toolkit.Graph.Providers; +using Microsoft.Toolkit.Uwp.Extensions; using Microsoft.Toolkit.Uwp.UI.Controls; -using Microsoft.Toolkit.Uwp.UI.Extensions; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index afbf744..6171ef1 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -17,11 +17,12 @@ - - + + + - 3.0.0-preview3.201113.0 + 3.0.0-preview4.210210.4 diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index 22e6c63..b170161 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -14,10 +14,7 @@ - + - - - diff --git a/SampleTest.Package/SampleTest.Package.wapproj b/SampleTest.Package/SampleTest.Package.wapproj index 2ff6530..cd4e232 100644 --- a/SampleTest.Package/SampleTest.Package.wapproj +++ b/SampleTest.Package/SampleTest.Package.wapproj @@ -20,13 +20,13 @@ Release x64 - + Debug - ARM64 + arm64 - + Release - ARM64 + arm64 @@ -62,11 +62,6 @@ True Properties\PublishProfiles\win10-$(Platform).pubxml - - - - - diff --git a/SampleTest.Package/build/Microsoft.WinUI.AppX.targets b/SampleTest.Package/build/Microsoft.WinUI.AppX.targets index 756b0ca..b390f52 100644 --- a/SampleTest.Package/build/Microsoft.WinUI.AppX.targets +++ b/SampleTest.Package/build/Microsoft.WinUI.AppX.targets @@ -2,72 +2,71 @@ Copyright (c) Microsoft Corporation. Licensed under the MIT License --> - - - - - - - - - - $(MSBuildThisFileDirectory) - - - $(WinUIClassRegistrationsDir.Substring(0,$(WinUIClassRegistrationsDir.IndexOf(';')))) - - - - - - - - - - + + + + + + $(MSBuildThisFileDirectory) + + + $(WinUIClassRegistrationsDir.Substring(0,$(WinUIClassRegistrationsDir.IndexOf(';')))) + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - + ]]> + + - $(MSBuildWarningsAsMessages); + $(MSBuildWarningsAsMessages); - - APPX1707; + APPX1707; - $(MSBuildWarningsAsMessages); + $(MSBuildWarningsAsMessages); - - MSB3268; + MSB3268; @@ -208,20 +206,23 @@ - - - - - - + Add a dependency for the app against VCLibs.Desktop, which contains the CRT DLLs that WinUI 3 is linked against. --> + - + + + + + + + + true + + + + net5.0-windows$(TargetPlatformVersion) + + + + + + + diff --git a/SampleTest/SampleTest.csproj b/SampleTest/SampleTest.csproj index 618bfaa..c3ccf83 100644 --- a/SampleTest/SampleTest.csproj +++ b/SampleTest/SampleTest.csproj @@ -20,9 +20,8 @@ - 3.0.0-preview3.201113.0 + 3.0.0-preview4.210210.4 - diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 421e274..c967098 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,9 +26,9 @@ steps: # Install Nuget Tool Installer - task: NuGetToolInstaller@0 - displayName: Use NuGet 5.6.0 + displayName: Use NuGet 5.8.1 inputs: - versionSpec: 5.6.0 + versionSpec: 5.8.1 - task: NuGetAuthenticate@0 displayName: 'NuGet Authenticate' @@ -48,21 +48,9 @@ steps: displayName: Set Version # Install Windows SDK 18362 (minimum compatible sdk) - - powershell: .\build\Install-WindowsSdkISO.ps1 18362 - displayName: Insider SDK + #- powershell: .\build\Install-WindowsSdkISO.ps1 18362 + # displayName: Insider SDK - - powershell: | - Write-Host "##vso[task.setvariable variable=PATH;]${env:LocalAppData}\Microsoft\dotnet;${env:PATH}"; - - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; - - dotnet new globaljson --sdk-version "$($env:NET5_SDK_VERSION)" - - &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version "$($env:NET5_SDK_VERSION)" -Architecture "x64" -AzureFeed "$($env:NET5_SDK_FEED)" - - failOnStderr: true - displayName: 'Install .NET 5 SDK' - # Run cake build - powershell: .\build.ps1 -target=Package displayName: Build From 2ec6d86711160998abac9741d1484afe0a6bd4cc Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Thu, 11 Feb 2021 11:17:04 -0800 Subject: [PATCH 20/21] Removed unused usings. --- .../Controls/GraphPresenter/QueryOption.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Microsoft.Toolkit.Graph.Controls/Controls/GraphPresenter/QueryOption.cs b/Microsoft.Toolkit.Graph.Controls/Controls/GraphPresenter/QueryOption.cs index 8af7159..2e3cde4 100644 --- a/Microsoft.Toolkit.Graph.Controls/Controls/GraphPresenter/QueryOption.cs +++ b/Microsoft.Toolkit.Graph.Controls/Controls/GraphPresenter/QueryOption.cs @@ -2,13 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Windows.UI.Xaml; - namespace Microsoft.Toolkit.Graph.Controls { /// From 4935b3c15b0061c2f86fee51d2217932c2d7392e Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Thu, 11 Feb 2021 13:37:46 -0800 Subject: [PATCH 21/21] Updated to stable mains toolkit preview4 version. --- .../Microsoft.Toolkit.Graph.Controls.csproj | 6 +++--- Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj | 2 +- nuget.config | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj index 848d024..cbc8400 100644 --- a/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj +++ b/Microsoft.Toolkit.Graph.Controls/Microsoft.Toolkit.Graph.Controls.csproj @@ -17,9 +17,9 @@ - - - + + + 3.0.0-preview4.210210.4 diff --git a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj index 91f073b..a7a58f1 100644 --- a/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj +++ b/Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj @@ -14,7 +14,7 @@ - + diff --git a/nuget.config b/nuget.config index 8698e94..c8dcc44 100644 --- a/nuget.config +++ b/nuget.config @@ -4,6 +4,7 @@ +