diff --git a/.gitignore b/.gitignore index c7eb234e317..f422ca85891 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,11 @@ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. +# Working folders +~build/ +~publish/ +~packages/ + # User-specific files *.suo *.user diff --git a/Directory.Build.props b/Directory.Build.props index 63fd9d141d7..3ddb90b8c38 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -11,7 +11,6 @@ true - $(RepositoryDirectory)bin\nupkg true true diff --git a/GazeInputTest/GazeInputTest.csproj b/GazeInputTest/GazeInputTest.csproj index 28a650ed0be..f48a7173c1d 100644 --- a/GazeInputTest/GazeInputTest.csproj +++ b/GazeInputTest/GazeInputTest.csproj @@ -21,7 +21,6 @@ true - bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x86 @@ -30,7 +29,6 @@ true - bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -42,7 +40,6 @@ true - bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full ARM @@ -51,7 +48,6 @@ true - bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -63,7 +59,6 @@ true - bin\ARM64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full ARM64 @@ -72,7 +67,6 @@ true - bin\ARM64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -84,7 +78,6 @@ true - bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x64 @@ -93,7 +86,6 @@ true - bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj b/Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj index ef888d18615..79e027cafff 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj +++ b/Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj @@ -24,7 +24,6 @@ true - bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x86 @@ -34,7 +33,6 @@ $(OutputPath)$(AssemblyName).xml - bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UWP;REMOTE_DOCS true pdbonly @@ -49,7 +47,6 @@ true - bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full ARM @@ -58,7 +55,6 @@ true - bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UWP;REMOTE_DOCS true pdbonly @@ -73,7 +69,6 @@ true - bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x64 @@ -82,7 +77,6 @@ true - bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP;REMOTE_DOCS true pdbonly @@ -1505,7 +1499,6 @@ true - bin\ARM64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP true full @@ -1515,7 +1508,6 @@ true - bin\ARM64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP;REMOTE_DOCS true true diff --git a/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.csproj b/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.csproj index 1610d8f86b6..11b35687b8d 100644 --- a/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.csproj +++ b/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks/Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.csproj @@ -23,7 +23,6 @@ true full false - bin\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP prompt 4 @@ -32,7 +31,6 @@ AnyCPU pdbonly true - bin\Release\ TRACE;NETFX_CORE;WINDOWS_UWP prompt 4 @@ -40,7 +38,6 @@ x86 true - bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x86 @@ -49,7 +46,6 @@ x86 - bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -60,7 +56,6 @@ ARM true - bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full ARM @@ -69,7 +64,6 @@ ARM - bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -80,7 +74,6 @@ x64 true - bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x64 @@ -89,7 +82,6 @@ x64 - bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -120,7 +112,6 @@ true - bin\ARM64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full ARM64 @@ -128,7 +119,6 @@ prompt - bin\ARM64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly diff --git a/Microsoft.Toolkit.Win32.WpfCore.SampleApp.PackagingProject/Microsoft.Toolkit.Win32.WpfCore.SampleApp.PackagingProject.wapproj b/Microsoft.Toolkit.Win32.WpfCore.SampleApp.PackagingProject/Microsoft.Toolkit.Win32.WpfCore.SampleApp.PackagingProject.wapproj index b72dca46f0c..e6a827bd8be 100644 --- a/Microsoft.Toolkit.Win32.WpfCore.SampleApp.PackagingProject/Microsoft.Toolkit.Win32.WpfCore.SampleApp.PackagingProject.wapproj +++ b/Microsoft.Toolkit.Win32.WpfCore.SampleApp.PackagingProject/Microsoft.Toolkit.Win32.WpfCore.SampleApp.PackagingProject.wapproj @@ -75,6 +75,10 @@ True + + $(BaseOutputPath)$(Configuration)\ + $(OutputPath)$(Platform) + diff --git a/SmokeTests/SmokeTest.csproj b/SmokeTests/SmokeTest.csproj index c053fef0779..e57abd520c8 100644 --- a/SmokeTests/SmokeTest.csproj +++ b/SmokeTests/SmokeTest.csproj @@ -37,8 +37,9 @@ SmokeTest_$(CurrentProject) - obj\$(CurrentProject)\ - bin\$(CurrentProject)\$(Platform)\$(Configuration)\ + ~build\ + $(BuildDir)$(CurrentProject)\obj\ + $(BuildDir)$(CurrentProject)\bin\ true @@ -123,7 +124,7 @@ - + diff --git a/SmokeTests/SmokeTests.proj b/SmokeTests/SmokeTests.proj index fe28bced3aa..80ee4977a6d 100644 --- a/SmokeTests/SmokeTests.proj +++ b/SmokeTests/SmokeTests.proj @@ -44,7 +44,7 @@ @@ -56,7 +56,6 @@ x86;x64;ARM;ARM64 - bin %(ToolkitPackage.Identity) @@ -78,7 +77,7 @@ - $(MSBuildThisFileDirectory)..\bin\nupkg + $(MSBuildThisFileDirectory)..\~packages\bin diff --git a/SmokeTests/nuget.config b/SmokeTests/nuget.config index 1a943588fb8..b2feedd72b5 100644 --- a/SmokeTests/nuget.config +++ b/SmokeTests/nuget.config @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/UITests/UITests.App/UITests.App.csproj b/UITests/UITests.App/UITests.App.csproj index a82743b5f4f..1a300fe06e5 100644 --- a/UITests/UITests.App/UITests.App.csproj +++ b/UITests/UITests.App/UITests.App.csproj @@ -31,7 +31,6 @@ true - bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x86 @@ -40,7 +39,6 @@ true - bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -52,7 +50,6 @@ true - bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full ARM @@ -61,7 +58,6 @@ true - bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -73,7 +69,6 @@ true - bin\ARM64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full ARM64 @@ -83,7 +78,6 @@ true - bin\ARM64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -95,7 +89,6 @@ true - bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x64 @@ -104,7 +97,6 @@ true - bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly diff --git a/UITests/UITests.Tests.Shared/Controls/ColorPickerButtonTest.cs b/UITests/UITests.Tests.Shared/Controls/ColorPickerButtonTest.cs index f1672919788..8f9e3da30f2 100644 --- a/UITests/UITests.Tests.Shared/Controls/ColorPickerButtonTest.cs +++ b/UITests/UITests.Tests.Shared/Controls/ColorPickerButtonTest.cs @@ -25,7 +25,7 @@ public class ColorPickerButtonTest : UITestBase [TestProperty("Platform", "Any")] public static void ClassInitialize(TestContext testContext) { - TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp); + TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp); } /// diff --git a/UITests/UITests.Tests.Shared/Controls/ConstrainedBoxTest.cs b/UITests/UITests.Tests.Shared/Controls/ConstrainedBoxTest.cs index 6a14ceae6d7..663e6707397 100644 --- a/UITests/UITests.Tests.Shared/Controls/ConstrainedBoxTest.cs +++ b/UITests/UITests.Tests.Shared/Controls/ConstrainedBoxTest.cs @@ -27,7 +27,7 @@ public class ConstrainedBoxTest : UITestBase [TestProperty("Platform", "Any")] public static void ClassInitialize(TestContext testContext) { - TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp); + TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp); } [TestMethod] diff --git a/UITests/UITests.Tests.Shared/Controls/GridSplitterTest.cs b/UITests/UITests.Tests.Shared/Controls/GridSplitterTest.cs index 4e09ea8dbb9..32ab111ea68 100644 --- a/UITests/UITests.Tests.Shared/Controls/GridSplitterTest.cs +++ b/UITests/UITests.Tests.Shared/Controls/GridSplitterTest.cs @@ -33,7 +33,7 @@ public class GridSplitterTest : UITestBase [TestProperty("Platform", "Any")] public static void ClassInitialize(TestContext testContext) { - TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp); + TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp); } [TestMethod] diff --git a/UITests/UITests.Tests.Shared/Controls/RangeSelectorTest.cs b/UITests/UITests.Tests.Shared/Controls/RangeSelectorTest.cs index 385271c42ee..3bbea6146ae 100644 --- a/UITests/UITests.Tests.Shared/Controls/RangeSelectorTest.cs +++ b/UITests/UITests.Tests.Shared/Controls/RangeSelectorTest.cs @@ -26,7 +26,7 @@ public class RangeSelectorTest : UITestBase [TestProperty("Platform", "Any")] public static void ClassInitialize(TestContext testContext) { - TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp); + TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp); } [TestMethod] diff --git a/UITests/UITests.Tests.Shared/Controls/RichSuggestBoxTest.cs b/UITests/UITests.Tests.Shared/Controls/RichSuggestBoxTest.cs index 6d722bd945d..98679d65e5c 100644 --- a/UITests/UITests.Tests.Shared/Controls/RichSuggestBoxTest.cs +++ b/UITests/UITests.Tests.Shared/Controls/RichSuggestBoxTest.cs @@ -27,7 +27,7 @@ public class RichSuggestBoxTest : UITestBase [TestProperty("Platform", "Any")] public static void ClassInitialize(TestContext testContext) { - TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp); + TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp); } [TestMethod] diff --git a/UITests/UITests.Tests.Shared/Controls/TextBoxMaskTest.cs b/UITests/UITests.Tests.Shared/Controls/TextBoxMaskTest.cs index b605debea8e..0dac88cb83d 100644 --- a/UITests/UITests.Tests.Shared/Controls/TextBoxMaskTest.cs +++ b/UITests/UITests.Tests.Shared/Controls/TextBoxMaskTest.cs @@ -25,7 +25,7 @@ public class TextBoxMaskTest : UITestBase [TestProperty("Platform", "Any")] public static void ClassInitialize(TestContext testContext) { - TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp); + TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp); } [TestMethod] diff --git a/UITests/UITests.Tests.Shared/Examples/SimpleTest.cs b/UITests/UITests.Tests.Shared/Examples/SimpleTest.cs index 6576a58bc4c..8e05b9a2d0e 100644 --- a/UITests/UITests.Tests.Shared/Examples/SimpleTest.cs +++ b/UITests/UITests.Tests.Shared/Examples/SimpleTest.cs @@ -25,7 +25,7 @@ public class SimpleTest : UITestBase [TestProperty("Platform", "Any")] public static void ClassInitialize(TestContext testContext) { - TestEnvironment.Initialize(testContext, WinUICsUWPSampleApp); + TestEnvironment.Initialize(testContext, WinUICSharpUWPSampleApp); } [TestMethod] diff --git a/UITests/UITests.Tests.Shared/TestAssembly.cs b/UITests/UITests.Tests.Shared/TestAssembly.cs index e2956adde8e..944580fdf50 100644 --- a/UITests/UITests.Tests.Shared/TestAssembly.cs +++ b/UITests/UITests.Tests.Shared/TestAssembly.cs @@ -36,10 +36,10 @@ public static void AssemblyInitialize(TestContext testContext) [AssemblyCleanup] public static void AssemblyCleanup() { - TestEnvironment.AssemblyCleanupWorker(UITestBase.WinUICsUWPSampleApp); + TestEnvironment.AssemblyCleanupWorker(UITestBase.WinUICSharpUWPSampleApp); } - private static async Task InitalizeComService() + private static async Task InitializeComService() { CommunicationService = new AppServiceConnection(); @@ -84,7 +84,7 @@ internal static async Task SendCustomMessageToApp(ValueSet m { if (CommunicationService is null) { - await InitalizeComService(); + await InitializeComService(); } return await CommunicationService.SendMessageAsync(message); @@ -94,7 +94,7 @@ private static async Task SendMessageToApp(ValueSet message) { if (CommunicationService is null) { - await InitalizeComService(); + await InitializeComService(); } var response = await CommunicationService.SendMessageAsync(message); diff --git a/UITests/UITests.Tests.Shared/UITestBase.cs b/UITests/UITests.Tests.Shared/UITestBase.cs index d513a7ca2e6..15eb6daccb9 100644 --- a/UITests/UITests.Tests.Shared/UITestBase.cs +++ b/UITests/UITests.Tests.Shared/UITestBase.cs @@ -25,46 +25,65 @@ public abstract class UITestBase { private TestSetupHelper helper; - internal static TestApplicationInfo WinUICsUWPSampleApp + internal static TestApplicationInfo WinUICSharpUWPSampleApp { get { - string assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - string baseDirectory = Path.Combine(Directory.GetParent(assemblyDir).Parent.Parent.Parent.Parent.FullName, "UITests.App"); + try + { + string assemblyDir = Path.GetDirectoryName(typeof(TestApplicationInfo).Assembly.Location); + var baseDir = Directory.GetParent(assemblyDir); - Log.Comment($"Base Package Search Directory = \"{baseDirectory}\""); + for (int i = 0; i < 10; i++) + { + if (baseDir.EnumerateDirectories().Any(d => d.Name.Equals("~build", StringComparison.OrdinalIgnoreCase))) + { + break; + } - var exclude = new[] { "Microsoft.NET.CoreRuntime", "Microsoft.VCLibs", "Microsoft.UI.Xaml", "Microsoft.NET.CoreFramework.Debug" }; - var files = Directory.GetFiles(baseDirectory, "*.msix", SearchOption.AllDirectories).Where(f => !exclude.Any(Path.GetFileNameWithoutExtension(f).Contains)); + baseDir = baseDir.Parent; + } - if (files.Count() == 0) - { - throw new Exception(string.Format("Failed to find '*.msix' in {0}'!", baseDirectory)); - } + string publishDir = Path.Combine(baseDir.FullName, "~publish"); - string mostRecentlyBuiltPackage = string.Empty; - DateTime timeMostRecentlyBuilt = DateTime.MinValue; + Log.Comment($"Base Package Search Directory = \"{publishDir}\""); - foreach (string file in files) - { - DateTime fileWriteTime = File.GetLastWriteTime(file); + var exclude = new[] { "Microsoft.NET.CoreRuntime", "Microsoft.VCLibs", "Microsoft.UI.Xaml", "Microsoft.NET.CoreFramework.Debug" }; + var files = Directory.EnumerateFiles(publishDir, "*.msix", SearchOption.AllDirectories).Where(f => !exclude.Any(Path.GetFileNameWithoutExtension(f).Contains)); - if (fileWriteTime > timeMostRecentlyBuilt) + if (!files.Any()) { - timeMostRecentlyBuilt = fileWriteTime; - mostRecentlyBuiltPackage = file; + throw new Exception($"Failed to find '*.msix' in {publishDir}'!"); } - } - return new TestApplicationInfo( - testAppPackageName: "UITests.App", - testAppName: "3568ebdf-5b6b-4ddd-bb17-462d614ba50f_yeyc6z1eztrme!App", - testAppPackageFamilyName: "3568ebdf-5b6b-4ddd-bb17-462d614ba50f_yeyc6z1eztrme", - testAppMainWindowTitle: "UITests.App", - processName: "UITests.App.exe", - installerName: mostRecentlyBuiltPackage.Replace(".msix", string.Empty), - certSerialNumber: "24d62f3b13b8b9514ead9c4de48cc30f7cc6151d", - baseAppxDir: baseDirectory); + string mostRecentlyBuiltPackage = string.Empty; + DateTime timeMostRecentlyBuilt = DateTime.MinValue; + + foreach (string file in files) + { + DateTime fileWriteTime = File.GetLastWriteTime(file); + + if (fileWriteTime > timeMostRecentlyBuilt) + { + timeMostRecentlyBuilt = fileWriteTime; + mostRecentlyBuiltPackage = file; + } + } + + return new TestApplicationInfo( + testAppPackageName: "UITests.App", + testAppName: "3568ebdf-5b6b-4ddd-bb17-462d614ba50f_yeyc6z1eztrme!App", + testAppPackageFamilyName: "3568ebdf-5b6b-4ddd-bb17-462d614ba50f_yeyc6z1eztrme", + testAppMainWindowTitle: "UITests.App", + processName: "UITests.App.exe", + installerName: mostRecentlyBuiltPackage.Replace(".msix", string.Empty), + certSerialNumber: "24d62f3b13b8b9514ead9c4de48cc30f7cc6151d", + baseAppxDir: publishDir); + } + catch (Exception e) + { + throw new AggregateException("Can't get Test Application info from the published MSIX packages. Check Output paths.", e); + } } } @@ -80,8 +99,7 @@ private static TestSetupHelper.TestSetupHelperOptions TestSetupHelperOptions public async Task TestInitialize() { // This will reset the test for each run (as from original WinUI https://github.com/microsoft/microsoft-ui-xaml/blob/master/test/testinfra/MUXTestInfra/Infra/TestHelpers.cs) - // We construct it so it doesn't try to run any tests since we use the AppService Bridge to complete - // our loading. + // We construct it so it doesn't try to run any tests since we use the AppService Bridge to complete our loading. helper = new TestSetupHelper(new string[] { }, TestSetupHelperOptions); var pageName = GetPageForTest(TestContext); @@ -132,13 +150,13 @@ private static string GetPageForTest(TestContext testContext) Log.Comment($"Found {testMethodString}."); - var testpageAttributeString = $"\"{typeof(TestPageAttribute)}\" on {testMethodString}"; + var testPageAttributeString = $"\"{typeof(TestPageAttribute)}\" on {testMethodString}"; if (method.GetCustomAttribute(typeof(TestPageAttribute), true) is not TestPageAttribute attribute) { - throw new Exception($"Could not find {testpageAttributeString}."); + throw new Exception($"Could not find {testPageAttributeString}."); } - Log.Comment($"Found {testpageAttributeString}. {nameof(TestPageAttribute.XamlFile)}: {attribute.XamlFile}."); + Log.Comment($"Found {testPageAttributeString}. {nameof(TestPageAttribute.XamlFile)}: {attribute.XamlFile}."); return attribute.XamlFile; } diff --git a/UnitTests/UnitTests.Notifications.UWP/UnitTests.Notifications.UWP.csproj b/UnitTests/UnitTests.Notifications.UWP/UnitTests.Notifications.UWP.csproj index 6c06c8484c3..63d6cfd5a4c 100644 --- a/UnitTests/UnitTests.Notifications.UWP/UnitTests.Notifications.UWP.csproj +++ b/UnitTests/UnitTests.Notifications.UWP/UnitTests.Notifications.UWP.csproj @@ -21,7 +21,6 @@ true - bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x86 @@ -30,7 +29,6 @@ true - bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -43,7 +41,6 @@ true - bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full ARM @@ -52,7 +49,6 @@ true - bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -65,7 +61,6 @@ true - bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x64 @@ -74,7 +69,6 @@ true - bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -90,7 +84,6 @@ true - bin\ARM64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full ARM64 @@ -99,7 +92,6 @@ true - bin\ARM64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly diff --git a/UnitTests/UnitTests.Notifications.WinRT/UnitTests.Notifications.WinRT.csproj b/UnitTests/UnitTests.Notifications.WinRT/UnitTests.Notifications.WinRT.csproj index ff993c99800..46a0d70cc48 100644 --- a/UnitTests/UnitTests.Notifications.WinRT/UnitTests.Notifications.WinRT.csproj +++ b/UnitTests/UnitTests.Notifications.WinRT/UnitTests.Notifications.WinRT.csproj @@ -21,7 +21,6 @@ true - bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;WINRT full x86 @@ -30,7 +29,6 @@ true - bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;WINRT true pdbonly @@ -43,7 +41,6 @@ true - bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;WINRT full ARM @@ -52,7 +49,6 @@ true - bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UWP;WINRT true pdbonly @@ -65,7 +61,6 @@ true - bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;WINRT full x64 @@ -74,7 +69,6 @@ true - bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP;WINRT true pdbonly @@ -90,7 +84,6 @@ true - bin\ARM64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;WINRT full ARM64 @@ -99,7 +92,6 @@ true - bin\ARM64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP;WINRT true pdbonly diff --git a/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj b/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj index 94bca731193..3b1e2a0b316 100644 --- a/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj +++ b/UnitTests/UnitTests.UWP/UnitTests.UWP.csproj @@ -21,7 +21,6 @@ true - bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x86 @@ -30,7 +29,6 @@ true - bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -44,7 +42,6 @@ true - bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full ARM @@ -53,7 +50,6 @@ true - bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -67,7 +63,6 @@ true - bin\ARM64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true full @@ -77,7 +72,6 @@ true - bin\ARM64\Release\ CODE_ANALYSIS;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true true @@ -91,7 +85,6 @@ true - bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x64 @@ -100,7 +93,6 @@ true - bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -355,7 +347,6 @@ true - bin\x86\Debug %28Version 1511%29\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true full @@ -366,7 +357,6 @@ true - bin\ARM\Debug %28Version 1511%29\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true full @@ -377,7 +367,6 @@ true - bin\x64\Debug %28Version 1511%29\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true full @@ -388,7 +377,6 @@ true - bin\x86\Debug %28Anniversary Update%29\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true full @@ -399,7 +387,6 @@ true - bin\ARM\Debug %28Anniversary Update%29\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true full @@ -410,7 +397,6 @@ true - bin\x64\Debug %28Anniversary Update%29\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true full @@ -420,7 +406,6 @@ true - bin\x86\Release %28Version 1511%29\ CODE_ANALYSIS;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true true @@ -432,7 +417,6 @@ true - bin\ARM\Release %28Version 1511%29\ CODE_ANALYSIS;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true true @@ -444,7 +428,6 @@ true - bin\x64\Release %28Version 1511%29\ CODE_ANALYSIS;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true true @@ -456,7 +439,6 @@ true - bin\x86\Release %28Anniversary Update%29\ CODE_ANALYSIS;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true true @@ -468,7 +450,6 @@ true - bin\ARM\Release %28Anniversary Update%29\ CODE_ANALYSIS;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true true @@ -480,7 +461,6 @@ true - bin\x64\Release %28Anniversary Update%29\ CODE_ANALYSIS;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS true true @@ -493,7 +473,6 @@ true - bin\ARM64\Debug %28Version 1511%29\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;CODE_ANALYSIS true full @@ -504,7 +483,6 @@ true - bin\ARM64\Debug %28Anniversary Update%29\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;CODE_ANALYSIS true full @@ -514,7 +492,6 @@ true - bin\ARM64\Release %28Version 1511%29\ CODE_ANALYSIS;CODE_ANALYSIS;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;CODE_ANALYSIS true true @@ -526,7 +503,6 @@ true - bin\ARM64\Release %28Anniversary Update%29\ CODE_ANALYSIS;CODE_ANALYSIS;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;CODE_ANALYSIS true true diff --git a/UnitTests/UnitTests.XamlIslands.Package/UnitTests.XamlIslands.Package.wapproj b/UnitTests/UnitTests.XamlIslands.Package/UnitTests.XamlIslands.Package.wapproj index 6d4a34b7d6f..049dc4ee417 100644 --- a/UnitTests/UnitTests.XamlIslands.Package/UnitTests.XamlIslands.Package.wapproj +++ b/UnitTests/UnitTests.XamlIslands.Package/UnitTests.XamlIslands.Package.wapproj @@ -83,6 +83,10 @@ true + + $(BaseOutputPath)$(Configuration)\ + $(OutputPath)$(Platform) + diff --git a/UnitTests/UnitTests.XamlIslands.UWPApp/UnitTests.XamlIslands.UWPApp.csproj b/UnitTests/UnitTests.XamlIslands.UWPApp/UnitTests.XamlIslands.UWPApp.csproj index 21d475366c7..e23eddd5a82 100644 --- a/UnitTests/UnitTests.XamlIslands.UWPApp/UnitTests.XamlIslands.UWPApp.csproj +++ b/UnitTests/UnitTests.XamlIslands.UWPApp/UnitTests.XamlIslands.UWPApp.csproj @@ -21,7 +21,6 @@ true - bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x86 @@ -30,7 +29,6 @@ true - bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -42,7 +40,6 @@ true - bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full ARM @@ -51,7 +48,6 @@ true - bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -63,7 +59,6 @@ true - bin\ARM64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full ARM64 @@ -73,7 +68,6 @@ true - bin\ARM64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly @@ -85,7 +79,6 @@ true - bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP full x64 @@ -94,7 +87,6 @@ true - bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UWP true pdbonly diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5c87f9637e3..c23918d8d59 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -91,13 +91,13 @@ jobs: env: SignClientUser: $(SignClientUser) SignClientSecret: $(SignClientSecret) - ArtifactDirectory: bin\nupkg + ArtifactDirectory: ~packages\bin condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], ''))) - task: PublishPipelineArtifact@1 displayName: Publish Package Artifacts inputs: - targetPath: .\bin\nupkg + targetPath: .\~packages\bin artifactName: Packages ### Smoke Tests ### @@ -111,7 +111,7 @@ jobs: displayName: Download NuGet Packages Artifact inputs: artifact: Packages - path: .\bin\nupkg + path: .\~packages\bin - task: DotNetCoreCLI@2 inputs: diff --git a/build/Windows.Toolkit.Common.props b/build/Windows.Toolkit.Common.props index 38374bf895c..fcd25fac3e6 100644 --- a/build/Windows.Toolkit.Common.props +++ b/build/Windows.Toolkit.Common.props @@ -11,7 +11,6 @@ https://github.com/CommunityToolkit/WindowsCommunityToolkit https://github.com/CommunityToolkit/WindowsCommunityToolkit/releases Icon.png - https://raw.githubusercontent.com/CommunityToolkit/WindowsCommunityToolkit/main/build/nuget.png @@ -34,6 +33,8 @@ $(MSBuildProjectName.Contains('Test')) $(MSBuildProjectName.Contains('.Uwp')) False + $(MSBuildProjectName.Contains('.Controls.')) + False False True @@ -44,4 +45,23 @@ $(TF_BUILD) + + + ~build\ + ~publish\ + + $(BuildDir)bin\ + $(BuildDir)obj\ + + $(BuildDir)ext\ + $(MSBuildProjectExtensionsPath) + + $(RepositoryDirectory)~packages\bin\ + $(RepositoryDirectory)~packages\obj\ + + $(PublishDir)TestResults\ + + $(PublishDir) + + diff --git a/build/Windows.Toolkit.Common.targets b/build/Windows.Toolkit.Common.targets index 61ae0c52034..28cd995b2dc 100644 --- a/build/Windows.Toolkit.Common.targets +++ b/build/Windows.Toolkit.Common.targets @@ -12,6 +12,11 @@ $(CommonTags) + + + $(BuildDir)**;$(PublishDir)**;$(DefaultItemExcludes) + + diff --git a/build/Windows.Toolkit.VisualStudio.Design.props b/build/Windows.Toolkit.VisualStudio.Design.props index c1731ddabb1..0c943341a97 100644 --- a/build/Windows.Toolkit.VisualStudio.Design.props +++ b/build/Windows.Toolkit.VisualStudio.Design.props @@ -9,7 +9,6 @@ False False - True uap$(TargetPlatformBaseVersion).$(TargetPlatformMinRevision) $(MSBuildProjectName.Remove($(MSBuildProjectName.LastIndexOf('.')))) diff --git a/build/Windows.Toolkit.VisualStudio.Design.targets b/build/Windows.Toolkit.VisualStudio.Design.targets index 83d83552d6b..1dec2c09418 100644 --- a/build/Windows.Toolkit.VisualStudio.Design.targets +++ b/build/Windows.Toolkit.VisualStudio.Design.targets @@ -2,7 +2,7 @@ $(RootNamespace.Remove($(RootNamespace.LastIndexOf('.')))) - ..\$(ParentProjectName)\bin\$(Configuration)\$(ParentTargetFramework)\ + ..\$(ParentProjectName)\~build\bin\$(Configuration)\$(ParentTargetFramework)\ $(ParentProjectOutputPath)Design\ diff --git a/build/build.cake b/build/build.cake index 585ad201e90..a2b1d5cf085 100644 --- a/build/build.cake +++ b/build/build.cake @@ -33,10 +33,10 @@ var buildDir = baseDir + "/build"; var Solution = baseDir + "/Windows Community Toolkit.sln"; var toolsDir = buildDir + "/tools"; -var binDir = baseDir + "/bin"; -var nupkgDir = binDir + "/nupkg"; +var packagesDir = baseDir + "/~packages"; +var pkgBinDir = packagesDir + "/bin"; -var taefBinDir = baseDir + $"/UITests/UITests.Tests.TAEF/bin/{configuration}/netcoreapp3.1/win10-x86"; +var taefBinDir = baseDir + $"/UITests/UITests.Tests.TAEF/~build/bin/{configuration}/netcoreapp3.1/win10-x86"; var styler = toolsDir + "/XamlStyler.Console/tools/xstyler.exe"; var stylerFile = baseDir + "/settings.xamlstyler"; @@ -114,14 +114,14 @@ Task("Clean") .Description("Clean the output folder") .Does(() => { - if(DirectoryExists(binDir)) + if(DirectoryExists(packagesDir)) { Information("\nCleaning Working Directory"); - CleanDirectory(binDir); + CleanDirectory(packagesDir); } else { - CreateDirectory(binDir); + CreateDirectory(packagesDir); } }); @@ -158,7 +158,7 @@ Task("BuildProjects") MSBuild(Solution, buildSettings); - EnsureDirectoryExists(nupkgDir); + EnsureDirectoryExists(pkgBinDir); // Build once with normal dependency ordering buildSettings = new MSBuildSettings @@ -222,7 +222,7 @@ Task("Package") .SetConfiguration(configuration) .WithTarget("Pack") .WithProperty("GenerateLibraryLayout", "true") - .WithProperty("PackageOutputPath", nupkgDir); + .WithProperty("PackageOutputPath", pkgBinDir); MSBuild(Solution, buildSettings); });