4315696136
Microsoft.NET.Sdk.WindowsDesktop emits NETSDK1100 when a Windows- targeting project is built from a non-Windows host. Setting EnableWindowsTargeting=true opts in to the cross-compile path, which works on Linux as long as the WindowsDesktop SDK files are present. On glados they were copied from a Windows .NET 8 SDK archive into /usr/lib/dotnet/sdk/8.0.126/Sdks/Microsoft.NET.Sdk.WindowsDesktop/ and /usr/lib/dotnet/packs/Microsoft.WindowsDesktop.App.Ref/. This is a one-time setup per Linux host -- see the bridge-claude memory note. No-op on Windows hosts (the flag has no effect when the SDK is native). Both PC builds and glados builds now produce the same output.
71 lines
3.4 KiB
XML
71 lines
3.4 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<PropertyGroup>
|
|
<OutputType>WinExe</OutputType>
|
|
<!-- net8.0-windows is required for the XboxAuthNet WebView2 OAuth flow:
|
|
the netstandard2.0 build of XboxAuthNet has no WebUI implementation. -->
|
|
<TargetFramework>net8.0-windows</TargetFramework>
|
|
<!-- Allow building this Windows-targeting project from Linux/macOS hosts.
|
|
No-op on Windows. Requires the WindowsDesktop SDK files to be
|
|
present in the local .NET install (on glados copied from the
|
|
Windows .NET 8 SDK archive into /usr/lib/dotnet/). -->
|
|
<EnableWindowsTargeting>true</EnableWindowsTargeting>
|
|
<UseWindowsForms>true</UseWindowsForms>
|
|
<Nullable>enable</Nullable>
|
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
|
<RootNamespace>ModpackLauncher</RootNamespace>
|
|
<AssemblyName>ModpackLauncher</AssemblyName>
|
|
<Version>0.4.9</Version>
|
|
<ApplicationIcon Condition="Exists('Assets\icon.ico')">Assets\icon.ico</ApplicationIcon>
|
|
|
|
<!-- Single-file self-contained publish defaults (Windows-only now due to WebView2) -->
|
|
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">win-x64</RuntimeIdentifier>
|
|
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
|
|
<PublishSingleFile>true</PublishSingleFile>
|
|
<SelfContained>true</SelfContained>
|
|
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
|
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
|
|
<DebugType>embedded</DebugType>
|
|
<CopyDebugSymbolFilesFromPackages>false</CopyDebugSymbolFilesFromPackages>
|
|
<CopyDocumentationFilesFromPackages>false</CopyDocumentationFilesFromPackages>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Avalonia" Version="12.0.2" />
|
|
<PackageReference Include="Avalonia.Desktop" Version="12.0.2" />
|
|
<PackageReference Include="Avalonia.Themes.Fluent" Version="12.0.2" />
|
|
<PackageReference Include="Avalonia.Fonts.Inter" Version="12.0.2" />
|
|
<PackageReference Include="AvaloniaUI.DiagnosticsSupport" Version="2.2.1">
|
|
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
|
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="CmlLib.Core" Version="4.0.6" />
|
|
<PackageReference Include="CmlLib.Core.Auth.Microsoft" Version="3.3.1" />
|
|
<PackageReference Include="CmlLib.Core.Installer.Forge" Version="1.1.1" />
|
|
<PackageReference Include="CmlLib.Core.Installer.NeoForge" Version="4.0.0" />
|
|
<PackageReference Include="XboxAuthNet.Game.Msal" Version="0.1.3" />
|
|
<PackageReference Include="fNbt" Version="0.7.1" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<EmbeddedResource Include="launcher-config.json" Condition="Exists('launcher-config.json')">
|
|
<LogicalName>launcher-config.json</LogicalName>
|
|
</EmbeddedResource>
|
|
<EmbeddedResource Include="launcher-config.template.json">
|
|
<LogicalName>launcher-config.template.json</LogicalName>
|
|
</EmbeddedResource>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<AvaloniaResource Include="Assets\icon.png" />
|
|
<AvaloniaResource Include="Assets\noise.png" />
|
|
</ItemGroup>
|
|
|
|
<Target Name="StripNativePdbs" AfterTargets="Publish">
|
|
<ItemGroup>
|
|
<_StripPdb Include="$(PublishDir)*.pdb" Exclude="$(PublishDir)$(AssemblyName).pdb" />
|
|
</ItemGroup>
|
|
<Delete Files="@(_StripPdb)" />
|
|
</Target>
|
|
</Project>
|