Use net7 AOT
This commit is contained in:
parent
8459f9bf3b
commit
47f5732b84
@ -3,12 +3,11 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- if you want to check exceptions, change this to "Exe" and start your app from the console -->
|
<!-- if you want to check exceptions, change this to "Exe" and start your app from the console -->
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<Platforms>x64</Platforms>
|
<Platforms>x64</Platforms>
|
||||||
<ApplicationIcon>Assets/app.ico</ApplicationIcon>
|
<ApplicationIcon>Assets/app.ico</ApplicationIcon>
|
||||||
<InvariantGlobalization>true</InvariantGlobalization>
|
<InvariantGlobalization>true</InvariantGlobalization>
|
||||||
<!--https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options-->
|
<PublishAot>true</PublishAot>
|
||||||
<TrimmerDefaultAction>link</TrimmerDefaultAction>
|
|
||||||
|
|
||||||
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
|
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
|
||||||
<IsLinux Condition="$([MSBuild]::IsOSPlatform('Linux'))">true</IsLinux>
|
<IsLinux Condition="$([MSBuild]::IsOSPlatform('Linux'))">true</IsLinux>
|
||||||
@ -21,13 +20,9 @@
|
|||||||
<IlcGenerateCompleteTypeMetadata>false</IlcGenerateCompleteTypeMetadata>
|
<IlcGenerateCompleteTypeMetadata>false</IlcGenerateCompleteTypeMetadata>
|
||||||
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
|
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
|
||||||
<IlcDisableUnhandledExceptionExperience>true</IlcDisableUnhandledExceptionExperience>
|
<IlcDisableUnhandledExceptionExperience>true</IlcDisableUnhandledExceptionExperience>
|
||||||
|
<StripSymbols>true</StripSymbols>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Instruct NativeAOT to use this native dependency, required to build Avalonia. This library comes from the Windows SDK. -->
|
|
||||||
<ItemGroup Condition="'$(IsWindows)'=='true'">
|
|
||||||
<NativeLibrary Include="WindowsApp.lib" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AvaloniaResource Include="Assets/**" />
|
<AvaloniaResource Include="Assets/**" />
|
||||||
<AvaloniaResource Include="Images/**" />
|
<AvaloniaResource Include="Images/**" />
|
||||||
@ -45,13 +40,13 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.0.0-preview4" />
|
<PackageReference Include="Avalonia" Version="11.0.999-cibuild0026098-beta" />
|
||||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview4" />
|
<PackageReference Include="Avalonia.Desktop" Version="11.0.999-cibuild0026098-beta" />
|
||||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview4" />
|
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.999-cibuild0026098-beta" />
|
||||||
<PackageReference Include="Avalonia.Themes.Simple" Version="11.0.0-preview4" />
|
<PackageReference Include="Avalonia.Themes.Simple" Version="11.0.999-cibuild0026098-beta" />
|
||||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview4" />
|
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.999-cibuild0026098-beta" />
|
||||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview4" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.999-cibuild0026098-beta" />
|
||||||
<!--Condition below is needed to generate macOS App only.-->
|
<!--Condition below is needed to generate macOS App only.-->
|
||||||
<PackageReference Include="Dotnet.Bundle" Version="*" Condition="$(RuntimeIdentifier.StartsWith('osx'))" />
|
<PackageReference Include="Dotnet.Bundle" Version="*" Condition="$(RuntimeIdentifier.StartsWith('osx'))" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@ -73,11 +68,4 @@
|
|||||||
<NSRequiresAquaSystemAppearance>true</NSRequiresAquaSystemAppearance>
|
<NSRequiresAquaSystemAppearance>true</NSRequiresAquaSystemAppearance>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="7.0.0-*" />
|
|
||||||
<!-- Avalonia relies heavily on reflection. Describe types reflected upon here. -->
|
|
||||||
<RdXmlFile Include="rd.xml" />
|
|
||||||
<RuntimeHostConfigurationOption Include="Switch.System.Reflection.Assembly.SimulatedCallingAssembly" Value="true" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
|
<add key="avalonia" value="https://nuget.avaloniaui.net/repository/avalonia-all/index.json" />
|
||||||
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
|
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
48
src/rd.xml
48
src/rd.xml
@ -1,48 +0,0 @@
|
|||||||
<Directives>
|
|
||||||
<Application>
|
|
||||||
<!-- main app assembly provides types which needs to be reflected upon -->
|
|
||||||
<Assembly Name="AvaloniaCoreRTDemo" Dynamic="Required All"></Assembly>
|
|
||||||
|
|
||||||
<!-- these are needed when you show images and draw text -->
|
|
||||||
<Assembly Name="Avalonia.Animation">
|
|
||||||
<Type Name="Avalonia.Animation.Easings.QuadraticEaseIn" Dynamic="Required All" />
|
|
||||||
<Type Name="Avalonia.Animation.Easings.QuadraticEaseOut" Dynamic="Required All" />
|
|
||||||
<Type Name="Avalonia.Animation.Easings.CubicEaseOut" Dynamic="Required All" />
|
|
||||||
<Type Name="Avalonia.Animation.Easings.LinearEasing" Dynamic="Required All" />
|
|
||||||
</Assembly>
|
|
||||||
<Assembly Name="Avalonia.Themes.Default" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Visuals" Dynamic="Required All">
|
|
||||||
<Type Name="Avalonia.Media.SolidColorBrush" Dynamic="Required All" />
|
|
||||||
</Assembly>
|
|
||||||
<Assembly Name="SkiaSharp" Dynamic="Required All"></Assembly>
|
|
||||||
|
|
||||||
<!-- To support Fluent themes trimming the final assembly we need to add this entry -->
|
|
||||||
<Assembly Name="Avalonia.Themes.Fluent" Dynamic="Required All"></Assembly>
|
|
||||||
|
|
||||||
<!-- Not known if and when you need these:
|
|
||||||
<Assembly Name="Avalonia.Controls" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Base" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Interactivity" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Layout" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Markup" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Markup.Xaml" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Styling" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.DesktopRuntime" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.DesignerSupport" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Diagnostics" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Dialogs" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Input" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Logging.Serilog" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.OpenGL" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Desktop" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Direct2D1" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.ReactiveUI" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Skia" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Avalonia.Win32" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="ReactiveUI" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="System.Reactive" Dynamic="Required All"></Assembly>
|
|
||||||
<Assembly Name="Splat" Dynamic="Required All"></Assembly>
|
|
||||||
-->
|
|
||||||
</Application>
|
|
||||||
</Directives>
|
|
Loading…
x
Reference in New Issue
Block a user