Skip to content

Commit

Permalink
misc: enhance .csproj files.
Browse files Browse the repository at this point in the history
  • Loading branch information
zdpcdt committed Dec 30, 2024
1 parent 4087b68 commit 64fd8a7
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 43 deletions.
9 changes: 4 additions & 5 deletions demo/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<AvaloniaVersion>11.2.2</AvaloniaVersion>
<CommunityToolkitVersion>8.3.2</CommunityToolkitVersion>
</PropertyGroup>
<PropertyGroup>
<AvaloniaVersion>11.2.3</AvaloniaVersion>
<CommunityToolkitVersion>8.4.0</CommunityToolkitVersion>
</PropertyGroup>
</Project>
10 changes: 4 additions & 6 deletions demo/Semi.Avalonia.Demo.Desktop/Program.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
using Avalonia;
using System;
using Avalonia;
using Avalonia.Dialogs;
using Avalonia.Media;
using System;
using System.Linq;
using System.Threading;

namespace Semi.Avalonia.Demo.Desktop;

class Program
sealed class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
Expand All @@ -33,4 +31,4 @@ public static AppBuilder BuildAvaloniaApp()
.UsePlatformDetect()
.With(new Win32PlatformOptions())
.LogToTrace();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@
</PropertyGroup>

<ItemGroup>
<TrimmerRootDescriptor Include="Roots.xml" />
<TrimmerRootDescriptor Include="Roots.xml"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj" />
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion demo/Semi.Avalonia.Demo.Drm/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Semi.Avalonia.Demo.Drm;

class Program
sealed class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
Expand Down
10 changes: 4 additions & 6 deletions demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@
</PropertyGroup>

<ItemGroup>
<TrimmerRootDescriptor Include="Roots.xml" />
<TrimmerRootDescriptor Include="Roots.xml"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.LinuxFramebuffer" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.LinuxFramebuffer" Version="$(AvaloniaVersion)"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj" />
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TargetFramework>net8.0-browser</TargetFramework>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
22 changes: 13 additions & 9 deletions demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,26 @@
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<AvaloniaResource Include="Assets\**" />
<AvaloniaResource Include="Assets\**"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)"/>
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="$(CommunityToolkitVersion)" />
<PackageReference Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)">
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
</PackageReference>
<PackageReference Include="CommunityToolkit.Mvvm" Version="$(CommunityToolkitVersion)"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj" />
<ProjectReference Include="..\..\src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj" />
<ProjectReference Include="..\..\src\Semi.Avalonia\Semi.Avalonia.csproj" />
<ProjectReference Include="..\..\src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj"/>
<ProjectReference Include="..\..\src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj"/>
<ProjectReference Include="..\..\src\Semi.Avalonia\Semi.Avalonia.csproj"/>
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions demo/Semi.Avalonia.TreeDataGrid.Demo/Program.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Avalonia;
using System;
using System;
using Avalonia;
using Avalonia.Media;

namespace Semi.Avalonia.TreeDataGrid.Demo;

class Program
sealed class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@
<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->
</PropertyGroup>

<Import Project="../Directory.Build.props" />
<Import Project="../Directory.Build.props"/>

<ItemGroup>
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)"/>
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="$(CommunityToolkitVersion)" />
<PackageReference Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)">
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
</PackageReference>
<PackageReference Include="CommunityToolkit.Mvvm" Version="$(CommunityToolkitVersion)"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Semi.Avalonia.TreeDataGrid\Semi.Avalonia.TreeDataGrid.csproj" />
<ProjectReference Include="..\..\src\Semi.Avalonia\Semi.Avalonia.csproj" />
<ProjectReference Include="..\..\src\Semi.Avalonia.TreeDataGrid\Semi.Avalonia.TreeDataGrid.csproj"/>
<ProjectReference Include="..\..\src\Semi.Avalonia\Semi.Avalonia.csproj"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Semi.Avalonia.DataGrid/Semi.Avalonia.DataGrid.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="../Package.props"/>

<PropertyGroup>
<Title>Semi.Avalonia.DataGrid</Title>
<PackageReleaseNotes>Update to Semi.Avalonia.DataGrid 11.2.1.2</PackageReleaseNotes>
Expand Down

0 comments on commit 64fd8a7

Please sign in to comment.