Upgrade to NET 7

This commit is contained in:
Manu
2023-01-23 20:07:13 +01:00
parent fcb162e8d2
commit f7e4198433
17 changed files with 118 additions and 43 deletions

View File

@@ -11,6 +11,8 @@ namespace SwitchGiftDataManager.CommandLine
var msg = $"Switch Gift Data Manager v{BCATManager.Version}";
Log(msg);
Task.Run(TryUpdate).Wait();
msg = $"{Environment.NewLine}Select your game:{Environment.NewLine}{Environment.NewLine}" +
$"1 - LGPE{Environment.NewLine}" +
$"2 - SWSH{Environment.NewLine}" +
@@ -216,6 +218,17 @@ namespace SwitchGiftDataManager.CommandLine
Directory.Delete(targetDir, false);
}
private static async Task TryUpdate()
{
if (await GitHubUtil.IsUpdateAvailable())
{
Log("A program update is available. Do you want to download the latest release?\n[Y\\n]:");
var str = Console.ReadLine();
if (!string.IsNullOrWhiteSpace(str) && (str.ToLower().Equals("y") || str.ToLower().Equals("yes")))
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo { FileName = @"https://github.com/Manu098vm/Switch-Gift-Data-Manager/releases", UseShellExecute = true });
}
}
private static void Log(string msg) => Console.WriteLine(msg);
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net7.0\win-x64\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net7.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2023-01-23T19:03:47.7790063Z;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Authors>Manu098vm</Authors>
@@ -21,14 +21,20 @@
<DebugType>embedded</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='WSL|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>
<PropertyGroup>
<DebugType>embedded</DebugType>
<EmbedAllSources>true</EmbedAllSources>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>false</PublishTrimmed>
<SelfContained>false</SelfContained>
</PropertyGroup>
<ItemGroup>
<None Include="..\README.md">
<Pack>True</Pack>

View File

@@ -5,5 +5,6 @@
</PropertyGroup>
<PropertyGroup>
<ActiveDebugProfile>SwitchGiftDataManager.CommandLine</ActiveDebugProfile>
<_LastSelectedProfileId>D:\Projects\SwitchGiftDataManager\SwitchGiftDataManager.CommandLine\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
</PropertyGroup>
</Project>