Skip to content

Commit 9ffd912

Browse files
committed
Update project to .NET 8 and centralize package management
Upgraded all projects to target .NET 8 for consistency and modernization. Removed now redundant `AssemblyInfo.cs` files and added centralized package management with `Directory.Packages.props`. Adjusted project configurations and references accordingly.
1 parent ad09ee3 commit 9ffd912

File tree

7 files changed

+48
-182
lines changed

7 files changed

+48
-182
lines changed

DesktopClient/DesktopClient.csproj

Lines changed: 7 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,15 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{FBF35ED7-BA7F-47FF-8C1E-B8AACAE1A2A4}</ProjectGuid>
3+
<TargetFramework>net8.0-windows</TargetFramework>
84
<OutputType>WinExe</OutputType>
9-
<RootNamespace>DesktopClient</RootNamespace>
10-
<AssemblyName>DesktopClient</AssemblyName>
11-
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
12-
<FileAlignment>512</FileAlignment>
13-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14-
<TargetFrameworkProfile />
5+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
6+
<UseWindowsForms>true</UseWindowsForms>
7+
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
158
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<PlatformTarget>AnyCPU</PlatformTarget>
18-
<DebugSymbols>true</DebugSymbols>
19-
<DebugType>full</DebugType>
20-
<Optimize>false</Optimize>
21-
<OutputPath>bin\Debug\</OutputPath>
22-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23-
<ErrorReport>prompt</ErrorReport>
24-
<WarningLevel>4</WarningLevel>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<PlatformTarget>AnyCPU</PlatformTarget>
28-
<DebugType>pdbonly</DebugType>
29-
<Optimize>true</Optimize>
30-
<OutputPath>bin\Release\</OutputPath>
31-
<DefineConstants>TRACE</DefineConstants>
32-
<ErrorReport>prompt</ErrorReport>
33-
<WarningLevel>4</WarningLevel>
34-
</PropertyGroup>
35-
<ItemGroup>
36-
<Reference Include="System" />
37-
<Reference Include="System.Core" />
38-
<Reference Include="System.Xml.Linq" />
39-
<Reference Include="System.Data.DataSetExtensions" />
40-
<Reference Include="Microsoft.CSharp" />
41-
<Reference Include="System.Data" />
42-
<Reference Include="System.Deployment" />
43-
<Reference Include="System.Drawing" />
44-
<Reference Include="System.Net.Http" />
45-
<Reference Include="System.Windows.Forms" />
46-
<Reference Include="System.Xml" />
47-
</ItemGroup>
48-
<ItemGroup>
49-
<Compile Include="DetectEncoding\EncodingTools.cs" />
50-
<Compile Include="DetectEncoding\Multilang\CMLangConvertCharset.cs" />
51-
<Compile Include="DetectEncoding\Multilang\CMLangConvertCharsetClass.cs" />
52-
<Compile Include="DetectEncoding\Multilang\CMLangString.cs" />
53-
<Compile Include="DetectEncoding\Multilang\CMLangStringClass.cs" />
54-
<Compile Include="DetectEncoding\Multilang\CMultiLanguage.cs" />
55-
<Compile Include="DetectEncoding\Multilang\CMultiLanguageClass.cs" />
56-
<Compile Include="DetectEncoding\Multilang\IEnumCodePage.cs" />
57-
<Compile Include="DetectEncoding\Multilang\IEnumRfc1766.cs" />
58-
<Compile Include="DetectEncoding\Multilang\IEnumScript.cs" />
59-
<Compile Include="DetectEncoding\Multilang\IMLangCodePages.cs" />
60-
<Compile Include="DetectEncoding\Multilang\IMLangConvertCharset.cs" />
61-
<Compile Include="DetectEncoding\Multilang\IMLangFontLink.cs" />
62-
<Compile Include="DetectEncoding\Multilang\IMLangFontLink2.cs" />
63-
<Compile Include="DetectEncoding\Multilang\IMLangLineBreakConsole.cs" />
64-
<Compile Include="DetectEncoding\Multilang\IMLangString.cs" />
65-
<Compile Include="DetectEncoding\Multilang\IMLangStringAStr.cs" />
66-
<Compile Include="DetectEncoding\Multilang\IMLangStringBufA.cs" />
67-
<Compile Include="DetectEncoding\Multilang\IMLangStringBufW.cs" />
68-
<Compile Include="DetectEncoding\Multilang\IMLangStringWStr.cs" />
69-
<Compile Include="DetectEncoding\Multilang\IMultiLanguage.cs" />
70-
<Compile Include="DetectEncoding\Multilang\IMultiLanguage2.cs" />
71-
<Compile Include="DetectEncoding\Multilang\IMultiLanguage3.cs" />
72-
<Compile Include="DetectEncoding\Multilang\ISequentialStream.cs" />
73-
<Compile Include="DetectEncoding\Multilang\IStream.cs" />
74-
<Compile Include="DetectEncoding\Multilang\tagDetectEncodingInfo.cs" />
75-
<Compile Include="DetectEncoding\Multilang\tagMIMECONTF.cs" />
76-
<Compile Include="DetectEncoding\Multilang\tagMIMECPINFO.cs" />
77-
<Compile Include="DetectEncoding\Multilang\tagMIMECSETINFO.cs" />
78-
<Compile Include="DetectEncoding\Multilang\tagMLCPF.cs" />
79-
<Compile Include="DetectEncoding\Multilang\tagMLDETECTCP.cs" />
80-
<Compile Include="DetectEncoding\Multilang\tagMLSTR_FLAGS.cs" />
81-
<Compile Include="DetectEncoding\Multilang\tagRFC1766INFO.cs" />
82-
<Compile Include="DetectEncoding\Multilang\tagSCRIPFONTINFO.cs" />
83-
<Compile Include="DetectEncoding\Multilang\tagSCRIPTINFO.cs" />
84-
<Compile Include="DetectEncoding\Multilang\tagSTATSTG.cs" />
85-
<Compile Include="DetectEncoding\Multilang\tagUNICODERANGE.cs" />
86-
<Compile Include="DetectEncoding\Multilang\_FILETIME.cs" />
87-
<Compile Include="DetectEncoding\Multilang\_LARGE_INTEGER.cs" />
88-
<Compile Include="DetectEncoding\Multilang\_RemotableHandle.cs" />
89-
<Compile Include="DetectEncoding\Multilang\_ULARGE_INTEGER.cs" />
90-
<Compile Include="DetectEncoding\Multilang\__MIDL_IWinTypes_0009.cs" />
91-
<Compile Include="Helpers\EncodingDetector.cs" />
92-
<Compile Include="Main.cs">
93-
<SubType>Form</SubType>
94-
</Compile>
95-
<Compile Include="Main.Designer.cs">
96-
<DependentUpon>Main.cs</DependentUpon>
97-
</Compile>
98-
<Compile Include="Models\EncodingItem.cs" />
99-
<Compile Include="Models\LanguageItem.cs" />
100-
<Compile Include="Models\MediaInfo.cs" />
101-
<Compile Include="Program.cs" />
102-
<Compile Include="Properties\AssemblyInfo.cs" />
103-
<EmbeddedResource Include="Main.resx">
104-
<DependentUpon>Main.cs</DependentUpon>
105-
</EmbeddedResource>
106-
<EmbeddedResource Include="Properties\Resources.resx">
107-
<Generator>ResXFileCodeGenerator</Generator>
108-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
109-
<SubType>Designer</SubType>
110-
</EmbeddedResource>
111-
<Compile Include="Properties\Resources.Designer.cs">
112-
<AutoGen>True</AutoGen>
113-
<DependentUpon>Resources.resx</DependentUpon>
114-
</Compile>
115-
<None Include="Properties\Settings.settings">
116-
<Generator>SettingsSingleFileGenerator</Generator>
117-
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
118-
</None>
119-
<Compile Include="Properties\Settings.Designer.cs">
120-
<AutoGen>True</AutoGen>
121-
<DependentUpon>Settings.settings</DependentUpon>
122-
<DesignTimeSharedInput>True</DesignTimeSharedInput>
123-
</Compile>
124-
</ItemGroup>
1259
<ItemGroup>
126-
<None Include="App.config" />
10+
<ProjectReference Include="..\src\SubDBSharp.csproj" />
12711
</ItemGroup>
12812
<ItemGroup>
129-
<ProjectReference Include="..\src\SubDBSharp.csproj">
130-
<Project>{d741cd9f-01aa-440d-bb49-0d0fd0b6b7df}</Project>
131-
<Name>SubDBSharp</Name>
132-
</ProjectReference>
13+
<PackageReference Include="Microsoft.CSharp" />
13314
</ItemGroup>
134-
<ItemGroup />
135-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
13615
</Project>

DesktopClient/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

Directory.Build.props

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project>
2+
<PropertyGroup>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<Configurations>Debug;Release</Configurations>
5+
<Authors>Ivandrofly</Authors>
6+
<Company>Ivandrofly</Company>
7+
<RepositoryUrl>https://github.com/nibblesoft/SubDBSharp</RepositoryUrl>
8+
<LangVersion>latest</LangVersion>
9+
</PropertyGroup>
10+
11+
<!-- <ItemGroup>-->
12+
<!-- <PackageReference Include="Newtonsoft.Json" Version="13.0.1"/>-->
13+
<!-- </ItemGroup>-->
14+
</Project>

Directory.Packages.props

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
5+
<NoWarn>$(NoWarn);NU1507</NoWarn>
6+
</PropertyGroup>
7+
<ItemGroup>
8+
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
9+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="16.0.0-preview-20190203-03" />
10+
<PackageVersion Include="xunit" Version="2.4.1" />
11+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.1" />
12+
</ItemGroup>
13+
</Project>
Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.2</TargetFramework>
5-
<ApplicationIcon />
6-
<OutputType>Library</OutputType>
2+
<PropertyGroup>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<ApplicationIcon />
5+
<OutputType>Library</OutputType>
76
<StartupObject />
87
</PropertyGroup>
9-
108
<ItemGroup>
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.0-preview-20190203-03" />
12-
<PackageReference Include="xunit" Version="2.4.1" />
13-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
9+
<PackageReference Include="Microsoft.NET.Test.Sdk" />
10+
<PackageReference Include="xunit" />
11+
<PackageReference Include="xunit.runner.visualstudio">
1412
<PrivateAssets>all</PrivateAssets>
1513
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
1614
</PackageReference>
1715
</ItemGroup>
18-
1916
<ItemGroup>
2017
<ProjectReference Include="..\src\SubDBSharp.csproj" />
2118
</ItemGroup>
22-
2319
<ItemGroup>
2420
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
2521
</ItemGroup>
26-
2722
<ItemGroup>
2823
<None Update="Assets\dexter.mp4">
2924
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -32,5 +27,4 @@
3227
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3328
</None>
3429
</ItemGroup>
35-
36-
</Project>
30+
</Project>

SubDBSharp.sln

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SubDBSharp", "src\SubDBShar
99
EndProject
1010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DesktopClient", "DesktopClient\DesktopClient.csproj", "{FBF35ED7-BA7F-47FF-8C1E-B8AACAE1A2A4}"
1111
EndProject
12+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solution Items", "{6251D74E-7892-46E6-AF20-CF984220E79B}"
13+
ProjectSection(SolutionItems) = preProject
14+
Directory.Packages.props = Directory.Packages.props
15+
EndProjectSection
16+
EndProject
1217
Global
1318
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1419
Debug|Any CPU = Debug|Any CPU

src/SubDBSharp.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2-
32
<PropertyGroup>
4-
<TargetFrameworks>netstandard1.3;net45</TargetFrameworks>
3+
<TargetFrameworks>net8.0</TargetFrameworks>
54
<AssemblyTitle>SubDBSharp</AssemblyTitle>
65
<Title>SubDBSharp</Title>
76
<PackageId>SubDBSharp</PackageId>
@@ -16,11 +15,9 @@
1615
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
1716
<RepositoryType>git</RepositoryType>
1817
</PropertyGroup>
19-
2018
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
2119
<Reference Include="System.Net.Http" />
2220
<Reference Include="System" />
2321
<Reference Include="Microsoft.CSharp" />
2422
</ItemGroup>
25-
2623
</Project>

0 commit comments

Comments
 (0)