From 38419e15383f0c25ca742b259493b1afe7abcdc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Velimir=20=C4=90urkovi=C4=87?= Date: Wed, 9 Nov 2022 01:14:40 +0100 Subject: [PATCH] Upgrade dotnet framework version to 7 --- .../DemoDotnetWebApi.Tests.csproj | 28 +++++++++++++++++++ DemoDotnetWebApi.Tests/UnitTest1.cs | 10 +++++++ DemoDotnetWebApi.Tests/Usings.cs | 1 + DemoDotnetWebApi.sln | 28 +++++++++++++++++++ .../Controllers}/PasswordController.cs | 0 .../DemoDotnetWebApi.csproj | 5 ++-- .../Interfaces}/IPasswordGenerator.cs | 0 .../Interfaces}/IRandomCharacterGenerator.cs | 0 .../Interfaces}/IStringShuffler.cs | 0 Program.cs => DemoDotnetWebApi/Program.cs | 0 .../Properties}/launchSettings.json | 18 +++++++++--- .../Services}/PasswordGenerator.cs | 0 .../Services}/RandomCharacterGenerator.cs | 0 .../Services}/StringShuffler.cs | 0 .../ShuffleExtension.cs | 0 .../appsettings.Development.json | 0 .../appsettings.json | 0 17 files changed, 84 insertions(+), 6 deletions(-) create mode 100644 DemoDotnetWebApi.Tests/DemoDotnetWebApi.Tests.csproj create mode 100644 DemoDotnetWebApi.Tests/UnitTest1.cs create mode 100644 DemoDotnetWebApi.Tests/Usings.cs create mode 100644 DemoDotnetWebApi.sln rename {Controllers => DemoDotnetWebApi/Controllers}/PasswordController.cs (100%) rename demo-dotnet-web-api.csproj => DemoDotnetWebApi/DemoDotnetWebApi.csproj (67%) rename {Interfaces => DemoDotnetWebApi/Interfaces}/IPasswordGenerator.cs (100%) rename {Interfaces => DemoDotnetWebApi/Interfaces}/IRandomCharacterGenerator.cs (100%) rename {Interfaces => DemoDotnetWebApi/Interfaces}/IStringShuffler.cs (100%) rename Program.cs => DemoDotnetWebApi/Program.cs (100%) rename {Properties => DemoDotnetWebApi/Properties}/launchSettings.json (57%) rename {Services => DemoDotnetWebApi/Services}/PasswordGenerator.cs (100%) rename {Services => DemoDotnetWebApi/Services}/RandomCharacterGenerator.cs (100%) rename {Services => DemoDotnetWebApi/Services}/StringShuffler.cs (100%) rename ShuffleExtension.cs => DemoDotnetWebApi/ShuffleExtension.cs (100%) rename appsettings.Development.json => DemoDotnetWebApi/appsettings.Development.json (100%) rename appsettings.json => DemoDotnetWebApi/appsettings.json (100%) diff --git a/DemoDotnetWebApi.Tests/DemoDotnetWebApi.Tests.csproj b/DemoDotnetWebApi.Tests/DemoDotnetWebApi.Tests.csproj new file mode 100644 index 0000000..37871ed --- /dev/null +++ b/DemoDotnetWebApi.Tests/DemoDotnetWebApi.Tests.csproj @@ -0,0 +1,28 @@ + + + + net7.0 + enable + enable + + false + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/DemoDotnetWebApi.Tests/UnitTest1.cs b/DemoDotnetWebApi.Tests/UnitTest1.cs new file mode 100644 index 0000000..58af5aa --- /dev/null +++ b/DemoDotnetWebApi.Tests/UnitTest1.cs @@ -0,0 +1,10 @@ +namespace DemoDotnetWebApi.Tests; + +public class UnitTest1 +{ + [Fact] + public void Test1() + { + + } +} \ No newline at end of file diff --git a/DemoDotnetWebApi.Tests/Usings.cs b/DemoDotnetWebApi.Tests/Usings.cs new file mode 100644 index 0000000..8c927eb --- /dev/null +++ b/DemoDotnetWebApi.Tests/Usings.cs @@ -0,0 +1 @@ +global using Xunit; \ No newline at end of file diff --git a/DemoDotnetWebApi.sln b/DemoDotnetWebApi.sln new file mode 100644 index 0000000..b7cd205 --- /dev/null +++ b/DemoDotnetWebApi.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoDotnetWebApi", "DemoDotnetWebApi\DemoDotnetWebApi.csproj", "{C23DC6F9-ADB7-4FFF-B864-53B8FD077ED0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoDotnetWebApi.Tests", "DemoDotnetWebApi.Tests\DemoDotnetWebApi.Tests.csproj", "{BD52DB82-803A-41E4-985E-9D3D0CBF4A41}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C23DC6F9-ADB7-4FFF-B864-53B8FD077ED0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C23DC6F9-ADB7-4FFF-B864-53B8FD077ED0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C23DC6F9-ADB7-4FFF-B864-53B8FD077ED0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C23DC6F9-ADB7-4FFF-B864-53B8FD077ED0}.Release|Any CPU.Build.0 = Release|Any CPU + {BD52DB82-803A-41E4-985E-9D3D0CBF4A41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD52DB82-803A-41E4-985E-9D3D0CBF4A41}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD52DB82-803A-41E4-985E-9D3D0CBF4A41}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD52DB82-803A-41E4-985E-9D3D0CBF4A41}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/Controllers/PasswordController.cs b/DemoDotnetWebApi/Controllers/PasswordController.cs similarity index 100% rename from Controllers/PasswordController.cs rename to DemoDotnetWebApi/Controllers/PasswordController.cs diff --git a/demo-dotnet-web-api.csproj b/DemoDotnetWebApi/DemoDotnetWebApi.csproj similarity index 67% rename from demo-dotnet-web-api.csproj rename to DemoDotnetWebApi/DemoDotnetWebApi.csproj index 492f5d6..671ad0f 100644 --- a/demo-dotnet-web-api.csproj +++ b/DemoDotnetWebApi/DemoDotnetWebApi.csproj @@ -1,14 +1,15 @@ - net6.0 + net7.0 enable enable DemoDotnetWebApi - + + diff --git a/Interfaces/IPasswordGenerator.cs b/DemoDotnetWebApi/Interfaces/IPasswordGenerator.cs similarity index 100% rename from Interfaces/IPasswordGenerator.cs rename to DemoDotnetWebApi/Interfaces/IPasswordGenerator.cs diff --git a/Interfaces/IRandomCharacterGenerator.cs b/DemoDotnetWebApi/Interfaces/IRandomCharacterGenerator.cs similarity index 100% rename from Interfaces/IRandomCharacterGenerator.cs rename to DemoDotnetWebApi/Interfaces/IRandomCharacterGenerator.cs diff --git a/Interfaces/IStringShuffler.cs b/DemoDotnetWebApi/Interfaces/IStringShuffler.cs similarity index 100% rename from Interfaces/IStringShuffler.cs rename to DemoDotnetWebApi/Interfaces/IStringShuffler.cs diff --git a/Program.cs b/DemoDotnetWebApi/Program.cs similarity index 100% rename from Program.cs rename to DemoDotnetWebApi/Program.cs diff --git a/Properties/launchSettings.json b/DemoDotnetWebApi/Properties/launchSettings.json similarity index 57% rename from Properties/launchSettings.json rename to DemoDotnetWebApi/Properties/launchSettings.json index 3cd099f..39074ad 100644 --- a/Properties/launchSettings.json +++ b/DemoDotnetWebApi/Properties/launchSettings.json @@ -4,17 +4,27 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:42697", - "sslPort": 44395 + "applicationUrl": "http://localhost:58469", + "sslPort": 44379 } }, "profiles": { - "DemoDotnetWebApi": { + "http": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "https://localhost:7145;http://localhost:5012", + "applicationUrl": "http://localhost:5144", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "https://localhost:7292;http://localhost:5144", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/Services/PasswordGenerator.cs b/DemoDotnetWebApi/Services/PasswordGenerator.cs similarity index 100% rename from Services/PasswordGenerator.cs rename to DemoDotnetWebApi/Services/PasswordGenerator.cs diff --git a/Services/RandomCharacterGenerator.cs b/DemoDotnetWebApi/Services/RandomCharacterGenerator.cs similarity index 100% rename from Services/RandomCharacterGenerator.cs rename to DemoDotnetWebApi/Services/RandomCharacterGenerator.cs diff --git a/Services/StringShuffler.cs b/DemoDotnetWebApi/Services/StringShuffler.cs similarity index 100% rename from Services/StringShuffler.cs rename to DemoDotnetWebApi/Services/StringShuffler.cs diff --git a/ShuffleExtension.cs b/DemoDotnetWebApi/ShuffleExtension.cs similarity index 100% rename from ShuffleExtension.cs rename to DemoDotnetWebApi/ShuffleExtension.cs diff --git a/appsettings.Development.json b/DemoDotnetWebApi/appsettings.Development.json similarity index 100% rename from appsettings.Development.json rename to DemoDotnetWebApi/appsettings.Development.json diff --git a/appsettings.json b/DemoDotnetWebApi/appsettings.json similarity index 100% rename from appsettings.json rename to DemoDotnetWebApi/appsettings.json