Browse Source

Add PublishAot and Trimming to `.csproj`

Ruben 5 months ago
parent
commit
2ad225779f

+ 12 - 5
src/PicView.Avalonia.MacOS/PicView.Avalonia.MacOS.csproj

@@ -4,22 +4,29 @@
 	<TargetFramework>net9.0</TargetFramework>
     <Platforms>x64;arm64</Platforms>
     <Nullable>enable</Nullable>
+    <LangVersion>preview</LangVersion>
+    
     <BuiltInComInteropSupport>true</BuiltInComInteropSupport>
     <ApplicationManifest>app.manifest</ApplicationManifest>
-    <Company>Ruben Hyldgaard Negendahl</Company>
-    <Product>PicView</Product>
     <UseAppHost>true</UseAppHost>
+    <ImplicitUsings>enable</ImplicitUsings>
+    
     <PublishAot>true</PublishAot>
-    <IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
+    <OptimizationPreference>Speed</OptimizationPreference>
     <Trimming>full</Trimming>
+    <TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
+    
+    <IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
     <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
-    <LangVersion>preview</LangVersion>
+
     <Company>Ruben Hyldgaard Negendahl</Company>
     <Authors>Ruben Hyldgaard Negendahl</Authors>
     <Copyright>© Ruben Hyldgaard Negendahl</Copyright>
-    <ImplicitUsings>enable</ImplicitUsings>
+
     <Product>PicView</Product>
     <AssemblyName>PicView</AssemblyName>
+
+    <HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
     <DebugType>none</DebugType>

+ 7 - 0
src/PicView.Avalonia/PicView.Avalonia.csproj

@@ -9,6 +9,12 @@
     <Product>PicView</Product>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <Platforms>x64;arm64</Platforms>
+
+    <PublishAot>true</PublishAot>
+    <Trimming>full</Trimming>
+    <TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
+    <OptimizationPreference>Speed</OptimizationPreference>
+    <HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
     <IsAotCompatible>False</IsAotCompatible>
@@ -22,6 +28,7 @@
   <PropertyGroup Label="Avalonia">
     <AvaloniaXamlIlDebuggerLaunch>False</AvaloniaXamlIlDebuggerLaunch>
   </PropertyGroup>
+  
 
   <PropertyGroup Condition="'$(Platform)' == 'x64'">
     <PlatformTarget>x64</PlatformTarget>

+ 6 - 0
src/PicView.Core.MacOS/PicView.Core.MacOS.csproj

@@ -5,6 +5,12 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
     <Platforms>arm64;x64</Platforms>
+
+    <PublishAot>true</PublishAot>
+    <Trimming>full</Trimming>
+    <TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
+    <OptimizationPreference>Speed</OptimizationPreference>
+    <HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
   </PropertyGroup>
 
   <ItemGroup>

+ 6 - 0
src/PicView.Core.WindowsNT/PicView.Core.WindowsNT.csproj

@@ -7,6 +7,12 @@
     <Platforms>x64;arm64</Platforms>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <LangVersion>preview</LangVersion>
+
+    <PublishAot>true</PublishAot>
+    <Trimming>full</Trimming>
+    <TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
+    <OptimizationPreference>Speed</OptimizationPreference>
+    <HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">