Skip to content

Commit b8c177d

Browse files
committed
.NET 6 fix
1 parent e64be96 commit b8c177d

File tree

6 files changed

+45
-50
lines changed

6 files changed

+45
-50
lines changed

SmartImage.Lib/SmartImage.Lib.csproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<PublishSingleFile>true</PublishSingleFile>
66
<PublishTrimmed>true</PublishTrimmed>
77
<Configurations>Debug;Release</Configurations>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="AngleSharp" Version="0.16.0" />
12-
<PackageReference Include="AngleSharp.Css" Version="0.16.0" />
11+
<PackageReference Include="AngleSharp" Version="0.16.1" />
12+
<PackageReference Include="AngleSharp.Css" Version="0.16.2" />
1313
<PackageReference Include="AngleSharp.Io" Version="0.16.0" />
1414
<PackageReference Include="AngleSharp.Js" Version="0.15.0" />
1515
<PackageReference Include="AngleSharp.XPath" Version="1.1.7" />
16-
<PackageReference Include="JetBrains.Annotations" Version="2021.1.0" />
16+
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" />
1717
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
18-
<PackageReference Include="RestSharp" Version="106.12.0" />
19-
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
18+
<PackageReference Include="RestSharp" Version="106.13.0" />
19+
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
2020
<PackageReference Include="System.Json" Version="4.7.1" />
21-
<PackageReference Include="System.Windows.Extensions" Version="5.0.0" />
21+
<PackageReference Include="System.Windows.Extensions" Version="6.0.0" />
2222
</ItemGroup>
2323

2424
<ItemGroup>
2525
<Reference Include="Kantan">
26-
<HintPath>..\..\..\VSProjects\Kantan\Kantan\bin\Release\net5.0\Kantan.dll</HintPath>
26+
<HintPath>..\..\..\VSProjects\Kantan\Kantan\bin\Release\net6.0\Kantan.dll</HintPath>
2727
</Reference>
2828
<Reference Include="Kantan.Net">
29-
<HintPath>..\..\..\VSProjects\Kantan\Kantan.Net\bin\Release\net5.0\Kantan.Net.dll</HintPath>
29+
<HintPath>..\..\..\VSProjects\Kantan\Kantan.Net\bin\Release\net6.0\Kantan.Net.dll</HintPath>
3030
</Reference>
3131
<Reference Include="Novus">
32-
<HintPath>..\..\..\VSProjects\Novus\Novus\bin\Release\net5.0\Novus.dll</HintPath>
32+
<HintPath>..\..\..\VSProjects\Novus\Novus\bin\Release\net6.0\Novus.dll</HintPath>
3333
</Reference>
3434
</ItemGroup>
3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='TestDebug|AnyCPU'">

SmartImage/Core/AppInfo.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,7 @@ public static bool IsAppFolderInPath
102102
{
103103
get
104104
{
105-
if (OperatingSystem.IsLinux()) {
106-
var p = Environment.GetEnvironmentVariable("PATH");
107-
return p.Contains(AppFolder);
108-
}
105+
109106

110107
return FileSystem.IsFolderInPath(AppFolder);
111108
}
@@ -120,6 +117,7 @@ public static void Setup()
120117
/*if (!OperatingSystem.IsWindows()) {
121118
throw new NotSupportedException();
122119
}*/
120+
123121

124122
if (!IsAppFolderInPath) {
125123
AppIntegration.HandlePath(true);

SmartImage/Program.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
using Kantan.Cli;
3737
using Kantan.Cli.Controls;
3838
using Kantan.Diagnostics;
39+
using Kantan.Model;
3940
using Kantan.Net;
4041
using Kantan.Text;
4142
using Kantan.Utilities;
@@ -141,11 +142,13 @@ public static class Program
141142

142143
#endregion
143144

145+
144146
/// <summary>
145147
/// Entry point
146148
/// </summary>
147149
private static async Task Main(string[] args)
148150
{
151+
Debug.WriteLine($"{Process.GetCurrentProcess().MainModule}");
149152
/*
150153
* Setup
151154
* Check compatibility
@@ -157,7 +160,7 @@ private static async Task Main(string[] args)
157160
Console.OutputEncoding = Encoding.Unicode;
158161

159162
Console.Title = $"{AppInfo.NAME}";
160-
163+
161164
//120,30
162165

163166
ConsoleManager.Init();

SmartImage/SmartImage.csproj

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,19 @@
55
<LangVersion>latest</LangVersion>
66
<!-- <TargetFramework>net5.0</TargetFramework> -->
77
<!-- <TargetFramework>net5.0-windows</TargetFramework> -->
8+
<TargetFramework>net6.0-windows10.0.22000.0</TargetFramework>
89

9-
<TargetFramework>net5.0-windows10.0.17763.0</TargetFramework>
1010

11+
<!-- <TargetFramework>net6.0-windows10.0.17763.0</TargetFramework> -->
1112
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
12-
<PublishSingleFile>true</PublishSingleFile>
13+
14+
15+
16+
<!-- <PublishSingleFile>true</PublishSingleFile> -->
17+
1318
<PublishTrimmed>true</PublishTrimmed>
19+
20+
1421
<!-- <RuntimeIdentifiers>win10-x64;ubuntu.16.04-x64</RuntimeIdentifiers> -->
1522

1623
<!--<PublishReadyToRun>true</PublishReadyToRun>-->
@@ -27,11 +34,6 @@
2734

2835

2936
</PropertyGroup>
30-
<ItemGroup>
31-
32-
<!-- <SupportedPlatform Include="win10-x64" /> -->
33-
34-
</ItemGroup>
3537
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
3638
<DefineConstants>DEBUG;TRACE;JETBRAINS_ANNOTATIONS</DefineConstants>
3739
<!-- <NoWarn>CA1416</NoWarn> -->
@@ -46,15 +48,24 @@
4648
</PropertyGroup>
4749

4850
<ItemGroup>
49-
<PackageReference Include="JetBrains.Annotations" Version="2021.1.0" />
50-
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.0.2" />
51+
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" />
52+
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" />
5153
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
5254
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
53-
<PackageReference Include="RestSharp" Version="106.12.0" />
54-
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
55+
<PackageReference Include="RestSharp" Version="106.13.0" />
56+
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
5557
<PackageReference Include="System.Json" Version="4.7.1" />
56-
<PackageReference Include="System.Windows.Extensions" Version="5.0.0" />
58+
<PackageReference Include="System.Windows.Extensions" Version="6.0.0" />
5759
<ProjectReference Include="..\SmartImage.Lib\SmartImage.Lib.csproj" />
60+
<Reference Include="Kantan">
61+
<HintPath>..\..\..\VSProjects\Kantan\Kantan\bin\Release\net6.0\Kantan.dll</HintPath>
62+
</Reference>
63+
<Reference Include="Kantan.Net">
64+
<HintPath>..\..\..\VSProjects\Kantan\Kantan.Net\bin\Release\net6.0\Kantan.Net.dll</HintPath>
65+
</Reference>
66+
<Reference Include="Novus">
67+
<HintPath>..\..\..\VSProjects\Novus\Novus\bin\Release\net6.0\Novus.dll</HintPath>
68+
</Reference>
5869

5970

6071
<!-- Trimmer dependencies -->
@@ -72,24 +83,7 @@
7283
<PackageIcon>Icon.png</PackageIcon>
7384
<Description>Reverse image search identification library. Features Windows context menu integration and a command line interface.</Description>
7485
<Copyright>Copyright 2021</Copyright>
86+
<ImplicitUsings>enable</ImplicitUsings>
7587
<!--<PackageIconUrl>https://raw.githubusercontent.com/Decimation/SmartImage/master/icon64.png</PackageIconUrl>-->
7688
</PropertyGroup>
77-
78-
79-
<ItemGroup>
80-
81-
<Reference Include="Kantan">
82-
<HintPath>..\..\..\VSProjects\Kantan\Kantan\bin\Release\net5.0\Kantan.dll</HintPath>
83-
</Reference>
84-
85-
<Reference Include="Kantan.Net">
86-
<HintPath>..\..\..\VSProjects\Kantan\Kantan.Net\bin\Release\net5.0\Kantan.Net.dll</HintPath>
87-
</Reference>
88-
89-
<Reference Include="Novus">
90-
<HintPath>..\..\..\VSProjects\Novus\Novus\bin\Release\net5.0\Novus.dll</HintPath>
91-
</Reference>
92-
93-
94-
</ItemGroup>
9589
</Project>

Test/Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net5.0</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
<Configurations>Debug;Release</Configurations>
77
</PropertyGroup>
88
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='TestDebug|AnyCPU'">

UnitTest/UnitTest.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77

@@ -13,8 +13,8 @@
1313
</PropertyGroup>
1414
<ItemGroup>
1515
<PackageReference Include="NUnit" Version="3.13.2" />
16-
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
17-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
16+
<PackageReference Include="NUnit3TestAdapter" Version="4.1.0" />
17+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

0 commit comments

Comments
 (0)