Skip to content

A Swiss Army knife for developers.

Fixed Windows build

Etienne Baudouxa2b7fb4bb141
diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json
index 2a209ae4c..87b41092c 100644
--- a/.nuke/build.schema.json
+++ b/.nuke/build.schema.json
@@ -68,7 +68,7 @@
"CLI",
"MacOS",
"Wasm",
- "WindowsUwp"
+ "Windows"
]
}
},
diff --git a/src/DevToys-Windows.sln b/src/DevToys-Windows.sln
index 97575be7e..e5e927d34 100644
--- a/src/DevToys-Windows.sln
+++ b/src/DevToys-Windows.sln
@@ -65,6 +65,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.MonacoEditor", "app
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.Wasm", "app\dev\platforms\web\DevToys.Wasm\DevToys.Wasm.csproj", "{9E59352A-836D-47DE-AB02-F404A8345242}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.MauiBlazor", "app\dev\platforms\desktop\DevToys.MauiBlazor\DevToys.MauiBlazor.csproj", "{64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|AnyCPU = Debug|AnyCPU
@@ -277,6 +279,24 @@ Global
{9E59352A-836D-47DE-AB02-F404A8345242}.Release|x64.Build.0 = Release|Any CPU
{9E59352A-836D-47DE-AB02-F404A8345242}.Release|x86.ActiveCfg = Release|Any CPU
{9E59352A-836D-47DE-AB02-F404A8345242}.Release|x86.Build.0 = Release|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Debug|AnyCPU.Build.0 = Debug|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Debug|AnyCPU.Deploy.0 = Debug|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Debug|x64.Build.0 = Debug|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Debug|x86.Build.0 = Debug|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Release|AnyCPU.ActiveCfg = Release|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Release|AnyCPU.Build.0 = Release|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Release|AnyCPU.Deploy.0 = Release|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Release|ARM64.Build.0 = Release|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Release|x64.ActiveCfg = Release|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Release|x64.Build.0 = Release|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Release|x86.ActiveCfg = Release|Any CPU
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -302,6 +322,7 @@ Global
{93E31B7F-903D-4F24-B30D-220489242866} = {B20E4027-0777-4A75-A848-609594E9A6B0}
{CDD8B469-ACA6-4A7D-91A0-66ADB0563AE8} = {B20E4027-0777-4A75-A848-609594E9A6B0}
{9E59352A-836D-47DE-AB02-F404A8345242} = {04F9E03E-B519-49C5-BC6A-2131ED9BADC0}
+ {64B8DB6D-3168-48DE-95BD-BBE7BAB3A262} = {22EE9386-CEFA-47D8-97B2-09A63EDF7F2E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C2C953F5-F97F-4198-B15C-4947A886050F}
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 90ff7c3ab..f3faaf6ae 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -5,7 +5,7 @@
<MinimumVisualStudioVersion>16.0</MinimumVisualStudioVersion>
<Windows10SDKVersion>10.0.22000.0</Windows10SDKVersion>
- <Windows10MinSDKVersionTrimmed>10.0.18362</Windows10MinSDKVersionTrimmed>
+ <Windows10MinSDKVersionTrimmed>10.0.19041</Windows10MinSDKVersionTrimmed>
<Windows10MinSDKVersion>$(Windows10MinSDKVersionTrimmed).0</Windows10MinSDKVersion>
<!-- Can't support 2.1 because UWP is dead and doesn't support it -->
diff --git a/src/app/dev/platforms/desktop/DevToys.MauiBlazor/DevToys.MauiBlazor.csproj b/src/app/dev/platforms/desktop/DevToys.MauiBlazor/DevToys.MauiBlazor.csproj
index 23c8646a7..ccd5dd683 100644
--- a/src/app/dev/platforms/desktop/DevToys.MauiBlazor/DevToys.MauiBlazor.csproj
+++ b/src/app/dev/platforms/desktop/DevToys.MauiBlazor/DevToys.MauiBlazor.csproj
@@ -1,75 +1,85 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
- <PropertyGroup>
- <TargetFrameworks Condition="$(IsWindows)">$(TargetFrameworks);$(NetCoreWindows)</TargetFrameworks>
- <TargetFrameworks Condition="$(IsMac)">$(TargetFrameworks);$(NetMacCatalyst)</TargetFrameworks>
- <OutputType>Exe</OutputType>
- <RootNamespace>DevToys.MauiBlazor</RootNamespace>
- <UseMaui>true</UseMaui>
- <SingleProject>true</SingleProject>
- <EnableDefaultCssItems>false</EnableDefaultCssItems>
-
- <!-- Display name -->
- <ApplicationTitle>DevToys</ApplicationTitle>
-
- <!-- App Identifier -->
- <ApplicationId>com.etiennebaudoux.devtoys</ApplicationId>
- <ApplicationIdGuid>856CF642-FDC7-42BE-A1D5-5D7F0FC09091</ApplicationIdGuid>
-
- <!-- Versions -->
- <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
- <ApplicationVersion>1</ApplicationVersion>
-
- <!-- Disable Central Package Management -->
- <ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
- </PropertyGroup>
-
- <Choose>
- <When Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">
- <PropertyGroup>
- <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="'$(RuntimeIdentifier)'==''">
- <!-- Default values for command line builds -->
- <RuntimeIdentifier Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">maccatalyst-arm64</RuntimeIdentifier>
- <RuntimeIdentifier Condition="'$(TargetFramework)' == '$(NetMacOS)'">osx-x64</RuntimeIdentifier>
- </PropertyGroup>
- </When>
-
- <When Condition="'$(TargetFramework)' == '$(NetCoreWindows)'">
- <PropertyGroup>
- <DefineConstants>$(DefineConstants);__WINDOWS__</DefineConstants>
- <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
- </PropertyGroup>
- </When>
- </Choose>
-
- <ItemGroup>
- <!-- App Icon -->
- <MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
-
- <!-- Splash Screen -->
- <MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
-
- <!-- Images -->
- <MauiImage Include="Resources\Images\*" />
- <MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
-
- <!-- Custom Fonts -->
- <MauiFont Include="Resources\Fonts\*" />
-
- <!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
- <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\..\..\DevToys.Api\DevToys.Api.csproj" />
- <ProjectReference Include="..\..\..\DevToys.Core\DevToys.Core.csproj" />
- </ItemGroup>
-
- <ItemGroup>
- <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(DotNetVersion)"/>
- <PackageReference Include="Microsoft.Fast.Components.FluentUI" Version="$(MicrosoftFastComponentsFluentUIVersion)"/>
- </ItemGroup>
-
-</Project>
+ <PropertyGroup>
+ <TargetFrameworks Condition="$(IsWindows)">$(NetCoreWindows)</TargetFrameworks>
+ <TargetFrameworks Condition="$(IsMac)">$(NetMacCatalyst)</TargetFrameworks>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>DevToys.MauiBlazor</RootNamespace>
+ <UseMaui>true</UseMaui>
+ <SingleProject>true</SingleProject>
+ <EnableDefaultCssItems>false</EnableDefaultCssItems>
+
+ <!-- Display name -->
+ <ApplicationTitle>DevToys</ApplicationTitle>
+
+ <!-- App Identifier -->
+ <ApplicationId>com.etiennebaudoux.devtoys</ApplicationId>
+ <ApplicationIdGuid>856CF642-FDC7-42BE-A1D5-5D7F0FC09091</ApplicationIdGuid>
+
+ <!-- Versions -->
+ <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
+ <ApplicationVersion>1</ApplicationVersion>
+
+ <!-- Disable Central Package Management -->
+ <ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
+ </PropertyGroup>
+
+ <Choose>
+ <When Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">
+ <PropertyGroup>
+ <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>
+ <RuntimeIdentifiers>maccatalyst-arm64;maccatalyst-x64</RuntimeIdentifiers>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(RuntimeIdentifier)'==''">
+ <!-- Default values for command line builds -->
+ <RuntimeIdentifier>maccatalyst-arm64</RuntimeIdentifier>
+ </PropertyGroup>
+ </When>
+
+ <When Condition="'$(TargetFramework)' == '$(NetCoreWindows)'">
+ <PropertyGroup>
+ <DefineConstants>$(DefineConstants);__WINDOWS__</DefineConstants>
+ <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
+ <SupportedOSPlatformVersion>$(Windows10MinSDKVersion)</SupportedOSPlatformVersion>
+ <Platforms>x86;x64;arm64</Platforms>
+ <RuntimeIdentifiers>win10-arm64;win10-x64;win10-x86</RuntimeIdentifiers>
+ <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
+ <AppxPackage>false</AppxPackage>
+ <WindowsPackageType>None</WindowsPackageType>
+ </PropertyGroup>
+ </When>
+ </Choose>
+
+ <PropertyGroup Condition="'$(RuntimeIdentifierOverride)' != ''">
+ <RuntimeIdentifier>$(RuntimeIdentifierOverride)</RuntimeIdentifier>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <!-- App Icon -->
+ <MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
+
+ <!-- Splash Screen -->
+ <MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
+
+ <!-- Images -->
+ <MauiImage Include="Resources\Images\*" />
+ <MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
+
+ <!-- Custom Fonts -->
+ <MauiFont Include="Resources\Fonts\*" />
+
+ <!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
+ <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\DevToys.Api\DevToys.Api.csproj" />
+ <ProjectReference Include="..\..\..\DevToys.Core\DevToys.Core.csproj" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(DotNetVersion)" />
+ <PackageReference Include="Microsoft.Fast.Components.FluentUI" Version="$(MicrosoftFastComponentsFluentUIVersion)" />
+ </ItemGroup>
+
+</Project>
\ No newline at end of file
diff --git a/src/app/dev/platforms/desktop/DevToys.MauiBlazor/Platforms/Windows/Package.appxmanifest b/src/app/dev/platforms/desktop/DevToys.MauiBlazor/Platforms/Windows/Package.appxmanifest
index ce64b6745..7f83f732a 100644
--- a/src/app/dev/platforms/desktop/DevToys.MauiBlazor/Platforms/Windows/Package.appxmanifest
+++ b/src/app/dev/platforms/desktop/DevToys.MauiBlazor/Platforms/Windows/Package.appxmanifest
@@ -4,43 +4,48 @@
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
- IgnorableNamespaces="uap rescap">
-
- <Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
-
- <mp:PhoneIdentity PhoneProductId="E9199B61-3B3B-4471-9E96-1ACFCA47E838" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
-
- <Properties>
- <DisplayName>$placeholder$</DisplayName>
- <PublisherDisplayName>User Name</PublisherDisplayName>
- <Logo>$placeholder$.png</Logo>
- </Properties>
-
- <Dependencies>
- <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
- <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
- </Dependencies>
-
- <Resources>
- <Resource Language="x-generate" />
- </Resources>
-
- <Applications>
- <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
- <uap:VisualElements
- DisplayName="$placeholder$"
- Description="$placeholder$"
- Square150x150Logo="$placeholder$.png"
- Square44x44Logo="$placeholder$.png"
- BackgroundColor="transparent">
- <uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
- <uap:SplashScreen Image="$placeholder$.png" />
- </uap:VisualElements>
- </Application>
- </Applications>
-
- <Capabilities>
- <rescap:Capability Name="runFullTrust" />
- </Capabilities>
+ IgnorableNamespaces="uap mp rescap">
+
+ <!-- Please DO NOT commit changes on the version number below unless you're about to release a new version of the app on the Store. -->
+ <Identity Name="DevToysPreview"
+ Publisher="CN=ebaud"
+ Version="0.0.0.0" />
+
+ <mp:PhoneIdentity PhoneProductId="E9199B61-3B3B-4471-9E96-1ACFCA47E838" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
+
+ <Properties>
+ <DisplayName>DevToys - Preview</DisplayName>
+ <PublisherDisplayName>etiennebaudoux</PublisherDisplayName>
+ <Logo>$placeholder$.png</Logo>
+ </Properties>
+
+ <Dependencies>
+ <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.19041.0" MaxVersionTested="10.0.19041.0" />
+ <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.19041.0" MaxVersionTested="10.0.19041.0" />
+ </Dependencies>
+
+ <Resources>
+ <Resource Language="x-generate" />
+ </Resources>
+
+ <Applications>
+ <Application Id="App"
+ Executable="$targetnametoken$.exe"
+ EntryPoint="$targetentrypoint$">
+ <uap:VisualElements
+ DisplayName="$placeholder$"
+ Description="$placeholder$"
+ Square150x150Logo="$placeholder$.png"
+ Square44x44Logo="$placeholder$.png"
+ BackgroundColor="transparent">
+ <uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
+ <uap:SplashScreen Image="$placeholder$.png" />
+ </uap:VisualElements>
+ </Application>
+ </Applications>
+
+ <Capabilities>
+ <rescap:Capability Name="runFullTrust" />
+ </Capabilities>
</Package>
diff --git a/src/app/dev/shared/GlobalUsings.cs b/src/app/dev/shared/GlobalUsings.cs
index 57b6fe4ab..b4dc6b866 100644
--- a/src/app/dev/shared/GlobalUsings.cs
+++ b/src/app/dev/shared/GlobalUsings.cs
@@ -12,5 +12,5 @@ global using ExportAttribute = global::System.ComponentModel.Composition.ExportA
#if __MAC__
[assembly: System.Runtime.Versioning.SupportedOSPlatform("ios14.0")] // MacCatalyst is a superset of iOS, therefore it's also supported.
#elif __WINDOWS__
-[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows10.0.18362.0")]
+[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows10.0.19041.0")]
#endif
diff --git a/src/build/Build.cs b/src/build/Build.cs
index 6256addc0..73e3a113f 100644
--- a/src/build/Build.cs
+++ b/src/build/Build.cs
@@ -55,7 +55,7 @@ class Build : NukeBuild
Assert.Fail("Parameter `--platform-targets` is missing. Please check `build.sh --help`.");
}
- if (PlatformTargets.Contains(PlatformTarget.WindowsUwp) && !OperatingSystem.IsWindowsVersionAtLeast(10, 0, 0, 0))
+ if (PlatformTargets.Contains(PlatformTarget.Windows) && !OperatingSystem.IsWindowsVersionAtLeast(10, 0, 0, 0))
{
Assert.Fail("To build Windows UWP app, you need to run on Windows 10 or later.");
}
@@ -120,30 +120,63 @@ class Build : NukeBuild
.DependsOn(Restore)
.Executes(() =>
{
- if (PlatformTargets.Contains(PlatformTarget.WindowsUwp))
+ if (PlatformTargets.Contains(PlatformTarget.Windows))
{
- RootDirectory
- .GlobFiles("**/*.wapproj")
- .ForEach(f =>
+ //RootDirectory
+ // .GlobFiles("**/*.wapproj")
+ // .ForEach(f =>
+ // {
+ // Log.Information($"Building {f}...");
+ // MSBuild(s => s
+ // .SetTargetPath(f)
+ // .SetConfiguration(Configuration)
+ // .SetTargets("Build")
+ // .AddProperty("AppxBundlePlatforms", "x86|x64|arm64")
+ // .AddProperty("AppxPackageDir", RootDirectory / "publish" / "MSIX")
+ // .AddProperty("AppxPackageSigningEnabled", false)
+ // .AddProperty("AppxSymbolPackageEnabled", true)
+ // .AddProperty("AppxBundle", "Always")
+ // .AddProperty("UapAppxPackageBuildMode", "StoreUpload")
+ // .SetProcessArgumentConfigurator(_ => _.Add($"/bl:\"{RootDirectory / "bin" / "msbuild.binlog"}\""))
+ // .SetVerbosity(MSBuildVerbosity.Quiet)
+ // .SetMaxCpuCount(1)
+ // .EnableRestore()
+ // // This is dummy but necessary otherwise MSBuild tries to use Any CPU, which doesn't work for UWP.
+ // .SetTargetPlatform(MSBuildTargetPlatform.x86));
+ // });
+
+ Project[] projects = {
+ MacSolution.GetProject("DevToys.MauiBlazor")
+ };
+
+ foreach (Project project in projects)
+ {
+ var configs = new List<DotnetParameters>();
+ foreach (string targetFramework in project.GetTargetFrameworks())
{
- Log.Information($"Building {f}...");
- MSBuild(s => s
- .SetTargetPath(f)
+ configs.Add(new DotnetParameters(project.Path, "win10-arm64", targetFramework, portable: true));
+ configs.Add(new DotnetParameters(project.Path, "win10-x64", targetFramework, portable: true));
+ configs.Add(new DotnetParameters(project.Path, "win10-x86", targetFramework, portable: true));
+ }
+
+ foreach (DotnetParameters dotnetParameters in configs)
+ {
+ Log.Information($"Publishing {dotnetParameters.ProjectOrSolutionPath + "-" + dotnetParameters.TargetFramework + "-" + dotnetParameters.RuntimeIdentifier}...");
+ DotNetPublish(s => s
+ .SetProject(dotnetParameters.ProjectOrSolutionPath)
.SetConfiguration(Configuration)
- .SetTargets("Build")
- .AddProperty("AppxBundlePlatforms", "x86|x64|arm64")
- .AddProperty("AppxPackageDir", RootDirectory / "publish" / "MSIX")
- .AddProperty("AppxPackageSigningEnabled", false)
- .AddProperty("AppxSymbolPackageEnabled", true)
- .AddProperty("AppxBundle", "Always")
- .AddProperty("UapAppxPackageBuildMode", "StoreUpload")
- .SetProcessArgumentConfigurator(_ => _.Add($"/bl:\"{RootDirectory / "bin" / "msbuild.binlog"}\""))
- .SetVerbosity(MSBuildVerbosity.Quiet)
- .SetMaxCpuCount(1)
- .EnableRestore()
- // This is dummy but necessary otherwise MSBuild tries to use Any CPU, which doesn't work for UWP.
- .SetTargetPlatform(MSBuildTargetPlatform.x86));
- });
+ .SetFramework(dotnetParameters.TargetFramework)
+ .SetRuntime(dotnetParameters.RuntimeIdentifier)
+ .SetSelfContained(true)
+ .SetPublishSingleFile(false)
+ .SetPublishReadyToRun(false)
+ .SetPublishTrimmed(false)
+ .SetVerbosity(DotNetVerbosity.Quiet)
+ .SetProcessArgumentConfigurator(_ => _
+ .Add("/p:RuntimeIdentifierOverride=" + dotnetParameters.RuntimeIdentifier))
+ .SetOutput(RootDirectory / "publish" / dotnetParameters.OutputPath));
+ }
+ }
}
if (PlatformTargets.Contains(PlatformTarget.MacOS))
@@ -173,7 +206,9 @@ class Build : NukeBuild
.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 */
+ .SetProcessArgumentConfigurator(_ => _
+ .Add("/p:RuntimeIdentifierOverride=" + dotnetParameters.RuntimeIdentifier)
+ .Add("/p:CreatePackage=True")) /* Will create an installable .pkg */
.SetOutputDirectory(RootDirectory / "publish" / dotnetParameters.OutputPath));
}
}
diff --git a/src/build/PlatformTarget.cs b/src/build/PlatformTarget.cs
index b84a57b17..0ddd0cc4e 100644
--- a/src/build/PlatformTarget.cs
+++ b/src/build/PlatformTarget.cs
@@ -1,6 +1,6 @@
enum PlatformTarget
{
- WindowsUwp,
+ Windows,
MacOS,
CLI,
Wasm