Skip to content

Commit

Permalink
Refactor project
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed May 27, 2022
1 parent e049d2c commit 4459a88
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 29 deletions.
47 changes: 18 additions & 29 deletions samples/ColorPickerDemo/ColorPickerDemo.csproj
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<!--Avalonia doesen't support TrimMode=link currently,but we are working on that https://github.com/AvaloniaUI/Avalonia/issues/6892 -->
<TrimMode>copyused</TrimMode>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
<None Remove=".gitignore" />
</ItemGroup>
<ItemGroup>
<!--This helps with theme dll-s trimming.
If you will publish your application in self-contained mode with p:PublishTrimmed=true and it will use Fluent theme Default theme will be trimmed from the output and vice versa.
https://github.com/AvaloniaUI/Avalonia/issues/5593 -->
<TrimmableAssembly Include="Avalonia.Themes.Fluent" />
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.13" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.13" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.13" />
<PackageReference Include="XamlNameReferenceGenerator" Version="1.3.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\ThemeEditor.Controls.ColorPicker\ThemeEditor.Controls.ColorPicker.csproj" />
</ItemGroup>

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<TrimMode>copyused</TrimMode>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<IsPackable>False</IsPackable>
</PropertyGroup>

<Import Project="..\..\build\ReferenceAssemblies.props"/>
<Import Project="..\..\build\Avalonia.Desktop.props"/>
<Import Project="..\..\build\Avalonia.Diagnostics.props"/>

<ItemGroup>
<ProjectReference Include="..\..\src\ThemeEditor.Controls.ColorPicker\ThemeEditor.Controls.ColorPicker.csproj"/>
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions samples/ColorPickerDemo/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Avalonia.Controls;
using Avalonia.Markup.Xaml;

namespace ColorPickerDemo
{
Expand All @@ -8,5 +9,10 @@ public MainWindow()
{
InitializeComponent();
}

private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
}

0 comments on commit 4459a88

Please sign in to comment.