From e674a025d8d082ff46c24fe8d5038900985cf371 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Wed, 29 Jan 2025 15:17:30 +0800 Subject: [PATCH] Adjust Directory.Build.props https://learn.microsoft.com/zh-cn/dotnet/core/deploying/trimming/trimming-options https://learn.microsoft.com/zh-cn/dotnet/csharp/language-reference/compiler-options/code-generation --- v2rayN/Directory.Build.props | 41 ++++-------------------------------- v2rayN/v2rayN/v2rayN.csproj | 6 ++++-- 2 files changed, 8 insertions(+), 39 deletions(-) diff --git a/v2rayN/Directory.Build.props b/v2rayN/Directory.Build.props index 982a6a51..f8f10259 100644 --- a/v2rayN/Directory.Build.props +++ b/v2rayN/Directory.Build.props @@ -5,61 +5,28 @@ </PropertyGroup> <PropertyGroup> + <TargetFramework>net8.0</TargetFramework> + <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> <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> + <Copyright>Copyright © 2017-$([System.DateTime]::UtcNow.Year) $(Authors)</Copyright> <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> + <UseSystemResourceKeys>true</UseSystemResourceKeys> <PublishSingleFile>true</PublishSingleFile> <IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract> </PropertyGroup> - </Project> diff --git a/v2rayN/v2rayN/v2rayN.csproj b/v2rayN/v2rayN/v2rayN.csproj index af1e3db6..9654625d 100644 --- a/v2rayN/v2rayN/v2rayN.csproj +++ b/v2rayN/v2rayN/v2rayN.csproj @@ -1,11 +1,13 @@ -<Project Sdk="Microsoft.NET.Sdk"> +<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore> <OutputType>WinExe</OutputType> + <TargetFramework>net8.0-windows10.0.17763</TargetFramework> + <GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore> <UseWPF>true</UseWPF> <ApplicationIcon>Resources\v2rayN.ico</ApplicationIcon> <ApplicationManifest>app.manifest</ApplicationManifest> + <SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion> </PropertyGroup> <ItemGroup>