misc(core): multi target frameworks

This commit is contained in:
genteure 2023-08-24 22:46:27 +08:00
parent e9342d43c4
commit 2f08500bc4
5 changed files with 19 additions and 17 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0"> <Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFrameworks>net472;net6.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>portable</DebugType> <DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -10,7 +10,7 @@
https://www.myget.org/F/jint/api/v3/index.json; https://www.myget.org/F/jint/api/v3/index.json;
</RestoreAdditionalProjectSources> </RestoreAdditionalProjectSources>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Fluid.Core" Version="2.3.1" /> <PackageReference Include="Fluid.Core" Version="2.3.1" />
<PackageReference Include="Flurl" Version="3.0.7" /> <PackageReference Include="Flurl" Version="3.0.7" />
@ -23,13 +23,21 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Polly" Version="7.2.3" /> <PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="Polly.Caching.Memory" Version="3.0.2" /> <PackageReference Include="Polly.Caching.Memory" Version="3.0.2" />
<PackageReference Include="PolySharp" Version="1.13.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Serilog" Version="2.12.0" /> <PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="StructLinq" Version="0.28.1" /> <PackageReference Include="StructLinq" Version="0.28.1" />
<PackageReference Include="System.IO.Pipelines" Version="6.0.3" /> <PackageReference Include="System.IO.Pipelines" Version="6.0.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\BililiveRecorder.Flv\BililiveRecorder.Flv.csproj" /> <ProjectReference Include="..\BililiveRecorder.Flv\BililiveRecorder.Flv.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<Reference Include="System.Web" />
</ItemGroup>
</Project> </Project>

View File

@ -14,9 +14,9 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Nullable" Version="1.3.1"> <PackageReference Include="PolySharp" Version="1.13.2">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Serilog" Version="2.12.0" /> <PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="StructLinq" Version="0.28.1" /> <PackageReference Include="StructLinq" Version="0.28.1" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
@ -332,10 +332,6 @@
<PackageReference Include="CliWrap"> <PackageReference Include="CliWrap">
<Version>3.3.2</Version> <Version>3.3.2</Version>
</PackageReference> </PackageReference>
<PackageReference Include="GitVersion.MsBuild" Version="5.6.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Hardcodet.NotifyIcon.Wpf"> <PackageReference Include="Hardcodet.NotifyIcon.Wpf">
<Version>1.1.0</Version> <Version>1.1.0</Version>
</PackageReference> </PackageReference>
@ -418,4 +414,4 @@
</PropertyGroup> </PropertyGroup>
<Exec Command="$(PkgNuGet_CommandLine)\tools\NuGet pack BililiveRecorder.nuspec -Version %(myAssemblyInfo.Version) -Properties Configuration=Release -OutputDirectory $(NupkgReleaseDir) -BasePath $(OutDir) -NonInteractive -ForceEnglishOutput" /> <Exec Command="$(PkgNuGet_CommandLine)\tools\NuGet pack BililiveRecorder.nuspec -Version %(myAssemblyInfo.Version) -Properties Configuration=Release -OutputDirectory $(NupkgReleaseDir) -BasePath $(OutDir) -NonInteractive -ForceEnglishOutput" />
</Target> </Target>
</Project> </Project>

View File

@ -3,7 +3,7 @@
<Copyright>Copyright © 2018-2023 Genteure</Copyright> <Copyright>Copyright © 2018-2023 Genteure</Copyright>
<Authors>Genteure</Authors> <Authors>Genteure</Authors>
<Company>$(Authors)</Company> <Company>$(Authors)</Company>
<LangVersion>9.0</LangVersion> <LangVersion>11.0</LangVersion>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>
<Target Name="_DisableCommandLineWarnings" BeforeTargets="ValidateCommandLineProperties"> <Target Name="_DisableCommandLineWarnings" BeforeTargets="ValidateCommandLineProperties">

View File

@ -1,9 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFrameworks>net4.8;net6.0</TargetFrameworks>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>