A Swiss Army knife for developers.
C# blazorcross-platformcsharpdesktopdesktop-appdesktop-applicationdeveloper-toolsextensiblefluentfluent-designlinuxmacosmicasyntax-highlightingtypescriptwindowswindows-10windows-11winui
Improved configuration
Etienne Baudoux327bfd67282e
diff --git a/init.ps1 b/init.ps1index 6bd695327..5969e0126 100644--- a/init.ps1+++ b/init.ps1@@ -39,7 +39,7 @@ ExecSafe { & $PSScriptRoot\tools\Install-DotNet.ps1 -RootFolder $PSScriptRoot }# Restore NuGet solution dependenciesWrite-Host "Restoring all dependencies"-Get-ChildItem $PSScriptRoot\src\ -rec |? { $_.FullName.EndsWith('.sln') } |% {+Get-ChildItem $PSScriptRoot\src\ -rec |? { $_.FullName.EndsWith('DevToys-Windows.sln') } |% {$SolutionPath = $_.FullName;Write-Host "Restoring packages for $($SolutionPath)..."ExecSafe { & $env:DOTNET_EXE restore -v:quiet $SolutionPath }diff --git a/init.sh b/init.shindex 00fb945d5..d8bb15074 100644--- a/init.sh+++ b/init.sh@@ -19,7 +19,7 @@ sudo dotnet workload install macos# Restore NuGet solution dependenciesecho "Restoring all dependencies"-SOLUTIONS=$(find ./src/ -iname "*.sln" -print)+SOLUTIONS=$(find ./src/ -iname "*DevToys-MacOS.sln" -print)for SOLUTION_FILE in $SOLUTIONSdoecho "Restoring packages for $SOLUTION_FILE..."diff --git a/src/app/dev/DevToys.Core/Threading/TaskExtensions.cs b/src/app/dev/DevToys.Core/Threading/TaskExtensions.csindex ea7d8d1cb..4831d6fcb 100644--- a/src/app/dev/DevToys.Core/Threading/TaskExtensions.cs+++ b/src/app/dev/DevToys.Core/Threading/TaskExtensions.cs@@ -1,6 +1,4 @@-using System.Threading.Tasks;--namespace DevToys.Core.Threading;+namespace DevToys.Core.Threading;/// <summary>/// Provides a set of helper method to play around with threads.diff --git a/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj b/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csprojindex 41b10045a..c251afb20 100644--- a/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj+++ b/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj@@ -15,42 +15,6 @@<EnableWindowsTargeting>true</EnableWindowsTargeting></PropertyGroup>- <PropertyGroup Condition="'$(TargetFramework)' == '$(UAP)'">- <IsUWP>true</IsUWP>- </PropertyGroup>-- <PropertyGroup Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">- <IsMacCatalyst>true</IsMacCatalyst>- </PropertyGroup>-- <PropertyGroup Condition="'$(TargetFramework)' == '$(NetCore)'">- <IsWasm>true</IsWasm>- </PropertyGroup>-- <PropertyGroup Condition="'$(IsWasm)' == 'true'">- <DefineConstants>$(DefineConstants);__WASM__</DefineConstants>- </PropertyGroup>-- <PropertyGroup Condition="'$(IsMacCatalyst)' == 'true'">- <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>- <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>- </PropertyGroup>-- <PropertyGroup Condition="'$(IsUWP)' == 'true'">- <DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>- <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>- <TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion>- <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>- <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>- <Platforms>AnyCPU;x86;x64;arm64</Platforms>- </PropertyGroup>- <PropertyGroup Condition="'$(IsUWP)' == 'true' And '$(Configuration)' == 'Release'">- <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>- </PropertyGroup>- <PropertyGroup Condition="'$(IsUWP)' == 'true' And '$(Platform)' == 'AnyCPU'">- <PlatformTarget>x86</PlatformTarget>- </PropertyGroup>-<ItemGroup><PackageReference Include="Newtonsoft.Json" /><PackageReference Include="Nito.AsyncEx" />@@ -65,26 +29,6 @@</PackageReference></ItemGroup>- <ItemGroup Condition="'$(IsUWP)' == 'true'">- <PackageReference Include="Microsoft.UI.Xaml" />- </ItemGroup>-- <ItemGroup Condition="'$(IsWasm)' == 'true' OR '$(IsMacCatalyst)' =='true'">- <PackageReference Include="Microsoft.Windows.Compatibility" />- <PackageReference Include="Uno.WinUI" />- <PackageReference Include="Uno.WinUI.Lottie" />- <PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />- </ItemGroup>-- <ItemGroup Condition="'$(IsWasm)' == 'true'">- <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" />- <PackageReference Include="Uno.WinUI.Runtime.WebAssembly" />- </ItemGroup>-- <ItemGroup Condition="'$(IsMacCatalyst)' == 'true'">- <PackageReference Include="System.Runtime.InteropServices.WindowsRuntime" />- </ItemGroup>-<ItemGroup><None Remove="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json" /><None Remove="ts-helpermethods\ts-helpermethods-Windows\tsconfig.json" />@@ -96,7 +40,6 @@<Content Include="ts-helpermethods\**\*.js"><DependentUpon>%(Filename).ts</DependentUpon></Content>-<UpToDateCheckInput Include="**\*.xaml" /><Content Include="Assets\**" /><PRIResource Include="**\*.resw" />@@ -106,29 +49,90 @@</Page></ItemGroup>- <ItemGroup Condition="'$(IsWindows)' == 'true'">- <Content Include="CodeEditor\CodeEditor.Windows.html" />-- <None Remove="ts-helpermethods\ts-helpermethods-Wasm\**\*.js" />- <Content Remove="ts-helpermethods\ts-helpermethods-Wasm\**\*.js" />- <TypeScriptCompile Remove="ts-helpermethods\ts-helpermethods-Wasm\**\*.*" />- <Content Include="ts-helpermethods\ts-helpermethods-Windows\tsconfig.json" />- <None Include="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json" />- </ItemGroup>-- <ItemGroup Condition="'$(IsWasm)' == 'true' OR '$(IsMacCatalyst)' =='true'">- <Content Include="Assets\**" />- <Compile Update="**\*.xaml.cs">- <DependentUpon>%(Filename)</DependentUpon>- </Compile>-- <None Remove="ts-helpermethods\**\*.js" />- <Content Remove="ts-helpermethods\**\*.js" />- <TypeScriptCompile Remove="ts-helpermethods\ts-helpermethods-Windows\**\*.js" />- <Content Include="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json" />- <None Include="ts-helpermethods\ts-helpermethods-Windows\tsconfig.json" />- <EmbeddedResource Include="WasmScripts\uno-monaco-helpers.js" />- </ItemGroup>+ <Choose>+ <When Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">+ <PropertyGroup>+ <IsMacCatalyst>true</IsMacCatalyst>+ <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>+ <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>+ </PropertyGroup>+ <ItemGroup>+ <PackageReference Include="Microsoft.Windows.Compatibility" />+ <PackageReference Include="Uno.WinUI" />+ <PackageReference Include="Uno.WinUI.Lottie" />+ <PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />+ <PackageReference Include="System.Runtime.InteropServices.WindowsRuntime" />+ </ItemGroup>+ <ItemGroup>+ <Content Include="Assets\**" />+ <Compile Update="**\*.xaml.cs">+ <DependentUpon>%(Filename)</DependentUpon>+ </Compile>+ <None Remove="ts-helpermethods\**\*.js" />+ <Content Remove="ts-helpermethods\**\*.js" />+ <TypeScriptCompile Remove="ts-helpermethods\ts-helpermethods-Windows\**\*.js" />+ <Content Include="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json" />+ <None Include="ts-helpermethods\ts-helpermethods-Windows\tsconfig.json" />+ <EmbeddedResource Include="WasmScripts\uno-monaco-helpers.js" />+ </ItemGroup>+ </When>++ <When Condition="'$(TargetFramework)' == '$(NetCore)'">+ <PropertyGroup>+ <IsWasm>true</IsWasm>+ <DefineConstants>$(DefineConstants);__WASM__</DefineConstants>+ </PropertyGroup>+ <ItemGroup>+ <PackageReference Include="Microsoft.Windows.Compatibility" />+ <PackageReference Include="Uno.WinUI" />+ <PackageReference Include="Uno.WinUI.Lottie" />+ <PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />+ <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" />+ <PackageReference Include="Uno.WinUI.Runtime.WebAssembly" />+ </ItemGroup>+ <ItemGroup>+ <Content Include="Assets\**" />+ <Compile Update="**\*.xaml.cs">+ <DependentUpon>%(Filename)</DependentUpon>+ </Compile>+ <None Remove="ts-helpermethods\**\*.js" />+ <Content Remove="ts-helpermethods\**\*.js" />+ <TypeScriptCompile Remove="ts-helpermethods\ts-helpermethods-Windows\**\*.js" />+ <Content Include="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json" />+ <None Include="ts-helpermethods\ts-helpermethods-Windows\tsconfig.json" />+ <EmbeddedResource Include="WasmScripts\uno-monaco-helpers.js" />+ </ItemGroup>+ </When>++ <When Condition="'$(TargetFramework)' == '$(UAP)'">+ <PropertyGroup>+ <IsUWP>true</IsUWP>+ <DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>+ <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>+ <TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion>+ <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>+ <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>+ <Platforms>AnyCPU;x86;x64;arm64</Platforms>+ </PropertyGroup>+ <PropertyGroup Condition="'$(Configuration)' == 'Release'">+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>+ </PropertyGroup>+ <PropertyGroup Condition="'$(Platform)' == 'AnyCPU'">+ <PlatformTarget>x86</PlatformTarget>+ </PropertyGroup>+ <ItemGroup>+ <PackageReference Include="Microsoft.UI.Xaml" />+ </ItemGroup>+ <ItemGroup>+ <Content Include="CodeEditor\CodeEditor.Windows.html" />+ <None Remove="ts-helpermethods\ts-helpermethods-Wasm\**\*.js" />+ <Content Remove="ts-helpermethods\ts-helpermethods-Wasm\**\*.js" />+ <TypeScriptCompile Remove="ts-helpermethods\ts-helpermethods-Wasm\**\*.*" />+ <Content Include="ts-helpermethods\ts-helpermethods-Windows\tsconfig.json" />+ <None Include="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json" />+ </ItemGroup>+ </When>+ </Choose><ItemGroup><ProjectReference Include="..\DevToys.Core\DevToys.Core.csproj" />diff --git a/src/app/dev/DevToys.MonacoEditor/Monaco/Editor/IModel.cs b/src/app/dev/DevToys.MonacoEditor/Monaco/Editor/IModel.csindex 8791a2a00..fac45398b 100644--- a/src/app/dev/DevToys.MonacoEditor/Monaco/Editor/IModel.cs+++ b/src/app/dev/DevToys.MonacoEditor/Monaco/Editor/IModel.cs@@ -1,5 +1,4 @@using Newtonsoft.Json;-using Windows.Foundation;using Windows.Foundation.Metadata;namespace DevToys.MonacoEditor.Monaco.Editor;diff --git a/src/app/dev/DevToys.MonacoEditor/Monaco/Languages/CodeActionProvider.cs b/src/app/dev/DevToys.MonacoEditor/Monaco/Languages/CodeActionProvider.csindex b4f68e727..ae7f7a04f 100644--- a/src/app/dev/DevToys.MonacoEditor/Monaco/Languages/CodeActionProvider.cs+++ b/src/app/dev/DevToys.MonacoEditor/Monaco/Languages/CodeActionProvider.cs@@ -1,5 +1,4 @@using DevToys.MonacoEditor.Monaco.Editor;-using Windows.Foundation;namespace DevToys.MonacoEditor.Monaco.Languages;diff --git a/src/app/dev/DevToys.MonacoEditor/Monaco/LanguagesHelper.cs b/src/app/dev/DevToys.MonacoEditor/Monaco/LanguagesHelper.csindex 873eca8d2..ea402d27d 100644--- a/src/app/dev/DevToys.MonacoEditor/Monaco/LanguagesHelper.cs+++ b/src/app/dev/DevToys.MonacoEditor/Monaco/LanguagesHelper.cs@@ -1,6 +1,5 @@using DevToys.MonacoEditor.Monaco.Languages;using Newtonsoft.Json;-using Windows.Foundation;namespace DevToys.MonacoEditor.Monaco;diff --git a/src/app/dev/DevToys.MonacoEditor/WebInterop/Parent/ParentAccessor.cs b/src/app/dev/DevToys.MonacoEditor/WebInterop/Parent/ParentAccessor.csindex 7e0591b0b..8a66b30ca 100644--- a/src/app/dev/DevToys.MonacoEditor/WebInterop/Parent/ParentAccessor.cs+++ b/src/app/dev/DevToys.MonacoEditor/WebInterop/Parent/ParentAccessor.cs@@ -1,7 +1,6 @@using System.Reflection;using System.Runtime.InteropServices.WindowsRuntime;using Newtonsoft.Json;-using Windows.Foundation;using Windows.Foundation.Metadata;namespace DevToys.MonacoEditor.WebInterop.Parent;diff --git a/src/app/dev/DevToys.UI.Framework/DevToys.UI.Framework.csproj b/src/app/dev/DevToys.UI.Framework/DevToys.UI.Framework.csprojindex 035579e17..85f31c597 100644--- a/src/app/dev/DevToys.UI.Framework/DevToys.UI.Framework.csproj+++ b/src/app/dev/DevToys.UI.Framework/DevToys.UI.Framework.csproj@@ -15,41 +15,57 @@<EnableWindowsTargeting>true</EnableWindowsTargeting></PropertyGroup>- <PropertyGroup Condition="'$(TargetFramework)' == '$(UAP)'">- <IsUWP>true</IsUWP>- </PropertyGroup>-- <PropertyGroup Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">- <IsMacCatalyst>true</IsMacCatalyst>- </PropertyGroup>-- <PropertyGroup Condition="'$(TargetFramework)' == '$(NetCore)'">- <IsWasm>true</IsWasm>- </PropertyGroup>+ <Choose>+ <When Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">+ <PropertyGroup>+ <IsMacCatalyst>true</IsMacCatalyst>+ <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>+ <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>+ </PropertyGroup>+ <ItemGroup>+ <PackageReference Include="Microsoft.Windows.Compatibility" />+ <PackageReference Include="Uno.WinUI" />+ <PackageReference Include="Uno.WinUI.Lottie" />+ <PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />+ </ItemGroup>+ </When>- <PropertyGroup Condition="'$(IsWasm)' == 'true'">- <DefineConstants>$(DefineConstants);__WASM__</DefineConstants>- </PropertyGroup>+ <When Condition="'$(TargetFramework)' == '$(NetCore)'">+ <PropertyGroup>+ <IsWasm>true</IsWasm>+ <DefineConstants>$(DefineConstants);__WASM__</DefineConstants>+ </PropertyGroup>+ <ItemGroup>+ <PackageReference Include="Microsoft.Windows.Compatibility" />+ <PackageReference Include="Uno.WinUI" />+ <PackageReference Include="Uno.WinUI.Lottie" />+ <PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />+ <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" />+ <PackageReference Include="Uno.WinUI.Runtime.WebAssembly" />+ </ItemGroup>+ </When>- <PropertyGroup Condition="'$(IsMacCatalyst)' == 'true'">- <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>- <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>- </PropertyGroup>-- <PropertyGroup Condition="'$(IsUWP)' == 'true'">- <DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>- <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>- <TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion>- <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>- <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>- <Platforms>AnyCPU;x86;x64;arm64</Platforms>- </PropertyGroup>- <PropertyGroup Condition="'$(IsUWP)' == 'true' And '$(Configuration)' == 'Release'">- <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>- </PropertyGroup>- <PropertyGroup Condition="'$(IsUWP)' == 'true' And '$(Platform)' == 'AnyCPU'">- <PlatformTarget>x86</PlatformTarget>- </PropertyGroup>+ <When Condition="'$(TargetFramework)' == '$(UAP)'">+ <PropertyGroup>+ <IsUWP>true</IsUWP>+ <DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>+ <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>+ <TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion>+ <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>+ <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>+ <Platforms>AnyCPU;x86;x64;arm64</Platforms>+ </PropertyGroup>+ <PropertyGroup Condition="'$(Configuration)' == 'Release'">+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>+ </PropertyGroup>+ <PropertyGroup Condition="'$(Platform)' == 'AnyCPU'">+ <PlatformTarget>x86</PlatformTarget>+ </PropertyGroup>+ <ItemGroup>+ <PackageReference Include="Microsoft.UI.Xaml" />+ </ItemGroup>+ </When>+ </Choose><ItemGroup><PackageReference Include="CommunityToolkit.Common" />@@ -62,27 +78,14 @@<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" /></ItemGroup>- <ItemGroup Condition="'$(IsUWP)' == 'true'">- <PackageReference Include="Microsoft.UI.Xaml" />- </ItemGroup>-- <ItemGroup Condition="'$(IsWasm)' == 'true' OR '$(IsMacCatalyst)' =='true'">- <PackageReference Include="Microsoft.Windows.Compatibility" />- <PackageReference Include="Uno.WinUI" />- <PackageReference Include="Uno.WinUI.Lottie" />- <PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />- </ItemGroup>-- <ItemGroup Condition="'$(IsWasm)' == 'true'">- <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" />- <PackageReference Include="Uno.WinUI.Runtime.WebAssembly" />- </ItemGroup>-<ItemGroup><UpToDateCheckInput Include="**\*.xaml" />- <Page Include="**\*.xaml" />- <Content Include="Assets\**" />+ <Page Include="**\*.xaml">+ <SubType>Designer</SubType>+ <Generator>MSBuild:Compile</Generator>+ </Page><PRIResource Include="**\*.resw" />+ <Content Include="Assets\**" /><Compile Update="**\*.xaml.cs"><DependentUpon>%(Filename)</DependentUpon></Compile>diff --git a/src/app/dev/DevToys.UI/DevToys.UI.csproj b/src/app/dev/DevToys.UI/DevToys.UI.csprojindex 150435814..550fcdaa1 100644--- a/src/app/dev/DevToys.UI/DevToys.UI.csproj+++ b/src/app/dev/DevToys.UI/DevToys.UI.csproj@@ -14,42 +14,58 @@<IsWasm>false</IsWasm><EnableWindowsTargeting>true</EnableWindowsTargeting></PropertyGroup>++ <Choose>+ <When Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">+ <PropertyGroup>+ <IsMacCatalyst>true</IsMacCatalyst>+ <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>+ <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>+ </PropertyGroup>+ <ItemGroup>+ <PackageReference Include="Microsoft.Windows.Compatibility" />+ <PackageReference Include="Uno.WinUI" />+ <PackageReference Include="Uno.WinUI.Lottie" />+ <PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />+ </ItemGroup>+ </When>- <PropertyGroup Condition="'$(TargetFramework)' == '$(UAP)'">- <IsUWP>true</IsUWP>- </PropertyGroup>-- <PropertyGroup Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">- <IsMacCatalyst>true</IsMacCatalyst>- </PropertyGroup>-- <PropertyGroup Condition="'$(TargetFramework)' == '$(NetCore)'">- <IsWasm>true</IsWasm>- </PropertyGroup>-- <PropertyGroup Condition="'$(IsWasm)' == 'true'">- <DefineConstants>$(DefineConstants);__WASM__</DefineConstants>- </PropertyGroup>-- <PropertyGroup Condition="'$(IsMacCatalyst)' == 'true'">- <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>- <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>- </PropertyGroup>+ <When Condition="'$(TargetFramework)' == '$(NetCore)'">+ <PropertyGroup>+ <IsWasm>true</IsWasm>+ <DefineConstants>$(DefineConstants);__WASM__</DefineConstants>+ </PropertyGroup>+ <ItemGroup>+ <PackageReference Include="Microsoft.Windows.Compatibility" />+ <PackageReference Include="Uno.WinUI" />+ <PackageReference Include="Uno.WinUI.Lottie" />+ <PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />+ <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" />+ <PackageReference Include="Uno.WinUI.Runtime.WebAssembly" />+ </ItemGroup>+ </When>- <PropertyGroup Condition="'$(IsUWP)' == 'true'">- <DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>- <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>- <TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion>- <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>- <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>- <Platforms>AnyCPU;x86;x64;arm64</Platforms>- </PropertyGroup>- <PropertyGroup Condition="'$(IsUWP)' == 'true' And '$(Configuration)' == 'Release'">- <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>- </PropertyGroup>- <PropertyGroup Condition="'$(IsUWP)' == 'true' And '$(Platform)' == 'AnyCPU'">- <PlatformTarget>x86</PlatformTarget>- </PropertyGroup>+ <When Condition="'$(TargetFramework)' == '$(UAP)'">+ <PropertyGroup>+ <IsUWP>true</IsUWP>+ <DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>+ <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>+ <TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion>+ <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>+ <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>+ <Platforms>AnyCPU;x86;x64;arm64</Platforms>+ </PropertyGroup>+ <PropertyGroup Condition="'$(Configuration)' == 'Release'">+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>+ </PropertyGroup>+ <PropertyGroup Condition="'$(Platform)' == 'AnyCPU'">+ <PlatformTarget>x86</PlatformTarget>+ </PropertyGroup>+ <ItemGroup>+ <PackageReference Include="Microsoft.UI.Xaml" />+ </ItemGroup>+ </When>+ </Choose><ItemGroup><PackageReference Include="CommunityToolkit.Common" />@@ -62,22 +78,6 @@<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" /></ItemGroup>- <ItemGroup Condition="'$(IsUWP)' == 'true'">- <PackageReference Include="Microsoft.UI.Xaml" />- </ItemGroup>-- <ItemGroup Condition="'$(IsWasm)' == 'true' OR '$(IsMacCatalyst)' =='true'">- <PackageReference Include="Microsoft.Windows.Compatibility" />- <PackageReference Include="Uno.WinUI" />- <PackageReference Include="Uno.WinUI.Lottie" />- <PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />- </ItemGroup>-- <ItemGroup Condition="'$(IsWasm)' == 'true'">- <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" />- <PackageReference Include="Uno.WinUI.Runtime.WebAssembly" />- </ItemGroup>-<ItemGroup><UpToDateCheckInput Include="**\*.xaml" /><Page Include="**\*.xaml">diff --git a/src/build/Build.cs b/src/build/Build.csindex 1aa0eb3de..7d6d8ade0 100644--- a/src/build/Build.cs+++ b/src/build/Build.cs@@ -3,7 +3,6 @@ using System.Collections.Generic;using System.Diagnostics;using System.Linq;using System.Runtime.InteropServices;-using Microsoft.Build.Evaluation;using Nuke.Common;using Nuke.Common.IO;using Nuke.Common.ProjectModel;@@ -153,8 +152,6 @@ class Build : NukeBuildvar configs = new List<DotnetParameters>();foreach (string targetFramework in project.GetTargetFrameworks()){- // configs.Add(new DotnetParameters(project.Path, "osx-x64", targetFramework, portable: true));- // configs.Add(new DotnetParameters(project.Path, "osx-arm64", targetFramework, portable: true));configs.Add(new DotnetParameters(project.Path, "maccatalyst-arm64", targetFramework, portable: true));configs.Add(new DotnetParameters(project.Path, "maccatalyst-x64", targetFramework, portable: true));}@@ -162,32 +159,16 @@ class Build : NukeBuildforeach (DotnetParameters dotnetParameters in configs){Log.Information($"Publishing {dotnetParameters.ProjectOrSolutionPath + "-" + dotnetParameters.TargetFramework + "-" + dotnetParameters.RuntimeIdentifier}...");- DotNetBuild(s => s- .SetProjectFile(dotnetParameters.ProjectOrSolutionPath)- .SetConfiguration(Configuration)- //.SetFramework(dotnetParameters.TargetFramework)- //.SetRuntime(dotnetParameters.RuntimeIdentifier)- //.SetSelfContained(dotnetParameters.Portable)- .SetPublishSingleFile(false) // Not supported by MacCatalyst as it would require UseAppHost to be true, which isn't supported on Mac- .SetPublishReadyToRun(false)- .SetPublishTrimmed(true) /* Required for MacCatalyst*/- .SetVerbosity(DotNetVerbosity.Quiet)- .SetNoRestore(true) /* workaround for https://github.com/xamarin/xamarin-macios/issues/15664#issuecomment-1233123515 */- .SetProcessArgumentConfigurator(_ => _.Add("/p:CreatePackage=True")) /* Will create an installable .pkg */- .SetOutputDirectory(RootDirectory / "publish" / dotnetParameters.OutputPath));- // DotNetPublish(s => s- // .SetProject(dotnetParameters.ProjectOrSolutionPath)- // .SetConfiguration(Configuration)- // .SetFramework(dotnetParameters.TargetFramework)- // //.SetRuntime(dotnetParameters.RuntimeIdentifier)- // //.SetSelfContained(dotnetParameters.Portable)- // .SetPublishSingleFile(false) // Not supported by MacCatalyst as it would require UseAppHost to be true, which isn't supported on Mac- // .SetPublishReadyToRun(false)- // .SetPublishTrimmed(true) /* Required for MacCatalyst*/- // .SetVerbosity(DotNetVerbosity.Quiet)- // .SetProcessArgumentConfigurator(_ => _.Add("/p:CreatePackage=True")) /* Will create an installable .pkg */- // .SetNoRestore(true) /* workaround for https://github.com/xamarin/xamarin-macios/issues/15664#issuecomment-1233123515 */- // .SetOutput(RootDirectory / "publish" / dotnetParameters.OutputPath));+ DotNetBuild(s => s+ .SetProjectFile(dotnetParameters.ProjectOrSolutionPath)+ .SetConfiguration(Configuration)+ .SetPublishSingleFile(false) // Not supported by MacCatalyst as it would require UseAppHost to be true, which isn't supported on Mac+ .SetPublishReadyToRun(false)+ .SetPublishTrimmed(true) /* Required for MacCatalyst*/+ .SetVerbosity(DotNetVerbosity.Quiet)+ .SetNoRestore(true) /* workaround for https://github.com/xamarin/xamarin-macios/issues/15664#issuecomment-1233123515 */+ .SetProcessArgumentConfigurator(_ => _.Add("/p:CreatePackage=True")) /* Will create an installable .pkg */+ .SetOutputDirectory(RootDirectory / "publish" / dotnetParameters.OutputPath));}}