Use Directory.Build.props for centralized configuration management (#6591)
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run

* use Directory.Buld.props

* remove some properties
This commit is contained in:
Anatoliy 2025-01-28 18:01:59 +06:00 committed by GitHub
parent 0e50bfb6eb
commit 98d4801b7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 91 additions and 46 deletions

65
Directory.Build.props Normal file
View file

@ -0,0 +1,65 @@
<Project>
<PropertyGroup>
<Version>7.7.0</Version>
</PropertyGroup>
<PropertyGroup>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<ErrorReport>none</ErrorReport>
<NoWarn>CA1031;CS1591;NU1507</NoWarn>
<Nullable>annotations</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisLevel>latest-all</AnalysisLevel>
<Authors>2dust</Authors>
<Company>2dust</Company>
<PackageLicenseExpression>GPL-3.0</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Copyright © 2017-$([System.DateTime]::UtcNow.Year) $(Company)</Copyright>
<Description>A GUI client for Windows, Linux and macOS, supports Xray, sing-box and others.</Description>
<RepositoryType>Git</RepositoryType>
<RepositoryBranch>master</RepositoryBranch>
<RepositoryUrl>$(PackageProjectUrl).git</RepositoryUrl>
<PackageProjectUrl>https://github.com/$(Company)/v2rayN</PackageProjectUrl>
<PackageReleaseNotes>$(PackageProjectUrl)/releases</PackageReleaseNotes>
<TargetFramework>net8.0-windows10.0.17763</TargetFramework>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<RollForward>latestMinor</RollForward>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DebugType>embedded</DebugType>
<Optimize>false</Optimize>
<InvariantGlobalization>false</InvariantGlobalization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebuggerSupport>false</DebuggerSupport>
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<EventSourceSupport>false</EventSourceSupport>
<StackTraceSupport>false</StackTraceSupport>
<MetricsSupport>false</MetricsSupport>
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
<UseNativeHttpHandler>true</UseNativeHttpHandler>
<AutoreleasePoolSupport>false</AutoreleasePoolSupport>
<InvariantGlobalization>false</InvariantGlobalization>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<PublishTrimmed>false</PublishTrimmed>
<PublishReadyToRun>false</PublishReadyToRun>
<PublishSingleFile>true</PublishSingleFile>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
</PropertyGroup>
</Project>

View file

@ -4,7 +4,6 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
<NoWarn>$(NoWarn);NU1507</NoWarn>
</PropertyGroup>
<ItemGroup>

View file

@ -2,14 +2,14 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Copyright>Copyright © 2017-2025 (GPLv3)</Copyright>
<FileVersion>1.3.1</FileVersion>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Update="Resx\Resource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
</EmbeddedResource>
<Compile Update="Resx\Resource.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
@ -17,11 +17,4 @@
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resx\Resource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

View file

@ -1,15 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>7.7.0</Version>
<OutputType>Library</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Downloader" />
<PackageReference Include="ReactiveUI"/>
<PackageReference Include="ReactiveUI">
<TreatAsUsed>true</TreatAsUsed>
</PackageReference>
<PackageReference Include="ReactiveUI.Fody" />
<PackageReference Include="sqlite-net-pcl" />
<PackageReference Include="Splat.NLog" />
@ -49,9 +48,6 @@
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resx\ResUI.fa-Ir.resx">
<SubType>Designer</SubType>
<Generator>PublicResXFileCodeGenerator</Generator>

View file

@ -2,37 +2,35 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationIcon>Assets\v2rayN.ico</ApplicationIcon>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<Copyright>Copyright © 2017-2025 (GPLv3)</Copyright>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<AssemblyName>v2rayN</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Controls.DataGrid" />
<PackageReference Include="Avalonia.Controls.DataGrid">
<TreatAsUsed>true</TreatAsUsed>
</PackageReference>
<PackageReference Include="Avalonia.Desktop" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" />
<PackageReference Include="Avalonia.ReactiveUI" />
<PackageReference Include="MessageBox.Avalonia" />
<PackageReference Include="Semi.Avalonia" />
<PackageReference Include="Semi.Avalonia.DataGrid" />
<PackageReference Include="ReactiveUI"/>
<PackageReference Include="ReactiveUI.Fody"/>
</ItemGroup>
<ItemGroup>
<AvaloniaResource Include="Assets\**" />
<PackageReference Include="Semi.Avalonia.DataGrid">
<TreatAsUsed>true</TreatAsUsed>
</PackageReference>
<PackageReference Include="ReactiveUI">
<TreatAsUsed>true</TreatAsUsed>
</PackageReference>
<PackageReference Include="ReactiveUI.Fody">
<TreatAsUsed>true</TreatAsUsed>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectCapability Include="Avalonia" />
</ItemGroup>
<ItemGroup>
<AvaloniaResource Include="Assets\**" />
<ProjectReference Include="..\ServiceLib\ServiceLib.csproj" />
</ItemGroup>
@ -40,9 +38,6 @@
<EmbeddedResource Include="Assets\v2rayN.ico">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Update="v2rayN.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>

View file

@ -3,20 +3,17 @@
<PropertyGroup>
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.17763</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationIcon>Resources\v2rayN.ico</ApplicationIcon>
<Copyright>Copyright © 2017-2025 (GPLv3)</Copyright>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MaterialDesignThemes" />
<PackageReference Include="H.NotifyIcon.Wpf" />
<PackageReference Include="ReactiveUI.Fody"/>
<PackageReference Include="ReactiveUI.Fody">
<TreatAsUsed>true</TreatAsUsed>
</PackageReference>
<PackageReference Include="ReactiveUI.WPF" />
</ItemGroup>