mirror of
https://github.com/Manu098vm/Switch-Gift-Data-Manager.git
synced 2026-08-19 01:07:09 -05:00
Upgrade to NET 7
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ActiveDebugProfile>SwitchGiftDataManager.CommandLine</ActiveDebugProfile>
|
||||
<_LastSelectedProfileId>D:\Projects\SwitchGiftDataManager\SwitchGiftDataManager.CommandLine\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user