From c8d25c53840a592016da9ee12bb7499a02104eec Mon Sep 17 00:00:00 2001 From: Cristian <67206480+CristianAmbrosini@users.noreply.github.com> Date: Tue, 26 Nov 2024 16:25:22 +0100 Subject: [PATCH] SCAN4NET-175 Remove .NET 6 SDK related tests (#2273) --- .../Resources/Readme.md | 4 +-- its/projects/CSharp.SDK.6/CSharp.SDK.6.sln | 31 ------------------- its/projects/CSharp.SDK.6/Main/Common.cs | 7 ----- its/projects/CSharp.SDK.6/Main/Main.csproj | 8 ----- its/projects/CSharp.SDK.6/UTs/CommonTest.cs | 17 ---------- its/projects/CSharp.SDK.6/UTs/UTs.csproj | 15 --------- .../DuplicateAnalyzerReferences/global.json | 2 +- .../global.json | 6 ---- ...orWebApplication.withSourceGenerators.sln} | 0 .../RazorWebApplication/Index.cshtml | 0 .../RazorWebApplication/Program.cs | 0 .../Properties/launchSettings.json | 0 .../RazorWebApplication.csproj | 2 +- .../RazorWebApplication/Startup.cs | 0 .../global.json | 2 +- ...ebApplication.withoutSourceGenerators.sln} | 0 .../RazorWebApplication/Index.cshtml | 0 .../RazorWebApplication/Program.cs | 0 .../Properties/launchSettings.json | 0 .../RazorWebApplication.csproj | 2 +- .../RazorWebApplication/Startup.cs | 0 .../global.json | 2 +- .../DefaultDriveFirstProject.csproj | 2 +- .../DefaultDriveSecondProject.vbproj | 2 +- .../DriveY/Subfolder/DriveY.csproj | 2 +- .../DefaultDrive/DefaultDrive.csproj | 2 +- .../DriveZ/Subfolder/DriveZ.csproj | 2 +- .../AspBackend/AspBackend.csproj | 2 +- .../msbuild/sonarqube/ScannerMSBuildTest.java | 25 +++------------ 29 files changed, 17 insertions(+), 118 deletions(-) delete mode 100644 its/projects/CSharp.SDK.6/CSharp.SDK.6.sln delete mode 100644 its/projects/CSharp.SDK.6/Main/Common.cs delete mode 100644 its/projects/CSharp.SDK.6/Main/Main.csproj delete mode 100644 its/projects/CSharp.SDK.6/UTs/CommonTest.cs delete mode 100644 its/projects/CSharp.SDK.6/UTs/UTs.csproj delete mode 100644 its/projects/RazorWebApplication.net6.withoutSourceGenerators/global.json rename its/projects/{RazorWebApplication.net6.withSourceGenerators/RazorWebApplication.net6.withSourceGenerators.sln => RazorWebApplication.net9.withSourceGenerators/RazorWebApplication.withSourceGenerators.sln} (100%) rename its/projects/{RazorWebApplication.net6.withSourceGenerators => RazorWebApplication.net9.withSourceGenerators}/RazorWebApplication/Index.cshtml (100%) rename its/projects/{RazorWebApplication.net6.withSourceGenerators => RazorWebApplication.net9.withSourceGenerators}/RazorWebApplication/Program.cs (100%) rename its/projects/{RazorWebApplication.net6.withSourceGenerators => RazorWebApplication.net9.withSourceGenerators}/RazorWebApplication/Properties/launchSettings.json (100%) rename its/projects/{RazorWebApplication.net6.withSourceGenerators => RazorWebApplication.net9.withSourceGenerators}/RazorWebApplication/RazorWebApplication.csproj (80%) rename its/projects/{RazorWebApplication.net6.withSourceGenerators => RazorWebApplication.net9.withSourceGenerators}/RazorWebApplication/Startup.cs (100%) rename its/projects/{CSharp.SDK.6 => RazorWebApplication.net9.withSourceGenerators}/global.json (67%) rename its/projects/{RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication.net6.withoutSourceGenerators.sln => RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication.withoutSourceGenerators.sln} (100%) rename its/projects/{RazorWebApplication.net6.withoutSourceGenerators => RazorWebApplication.net9.withoutSourceGenerators}/RazorWebApplication/Index.cshtml (100%) rename its/projects/{RazorWebApplication.net6.withoutSourceGenerators => RazorWebApplication.net9.withoutSourceGenerators}/RazorWebApplication/Program.cs (100%) rename its/projects/{RazorWebApplication.net6.withoutSourceGenerators => RazorWebApplication.net9.withoutSourceGenerators}/RazorWebApplication/Properties/launchSettings.json (100%) rename its/projects/{RazorWebApplication.net6.withoutSourceGenerators => RazorWebApplication.net9.withoutSourceGenerators}/RazorWebApplication/RazorWebApplication.csproj (80%) rename its/projects/{RazorWebApplication.net6.withoutSourceGenerators => RazorWebApplication.net9.withoutSourceGenerators}/RazorWebApplication/Startup.cs (100%) rename its/projects/{RazorWebApplication.net6.withSourceGenerators => RazorWebApplication.net9.withoutSourceGenerators}/global.json (67%) diff --git a/Tests/SonarScanner.MSBuild.TFS.Test/Resources/Readme.md b/Tests/SonarScanner.MSBuild.TFS.Test/Resources/Readme.md index 863778fe7..88b4e8923 100644 --- a/Tests/SonarScanner.MSBuild.TFS.Test/Resources/Readme.md +++ b/Tests/SonarScanner.MSBuild.TFS.Test/Resources/Readme.md @@ -1,5 +1,5 @@ The `Sample.coverage` file is an input file for the Conv_ConvertToXml_ToolConvertsSampleFile test. It was generated in the following way: -* New .Net6.0 Console App called "ConsoleApp2" +* New .Net9.0 Console App called "ConsoleApp2" * `Program.cs` looks like so: ```cs @@ -17,7 +17,7 @@ namespace ConsoleApp2 } ``` -* A second .Net6.0 MS Test project called "TestProject1" which references `ConsoleApp2.csproj` +* A second .Net9.0 MS Test project called "TestProject1" which references `ConsoleApp2.csproj` * One test file `UnitTest1.cs`: ```cs diff --git a/its/projects/CSharp.SDK.6/CSharp.SDK.6.sln b/its/projects/CSharp.SDK.6/CSharp.SDK.6.sln deleted file mode 100644 index d656bb5d8..000000000 --- a/its/projects/CSharp.SDK.6/CSharp.SDK.6.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.7.34031.279 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Main", "Main\Main.csproj", "{30024C57-CF88-4890-AD9F-7C2A640F670A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UTs", "UTs\UTs.csproj", "{3E56B4AA-38B0-4255-B2A2-83334132DB21}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {30024C57-CF88-4890-AD9F-7C2A640F670A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {30024C57-CF88-4890-AD9F-7C2A640F670A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {30024C57-CF88-4890-AD9F-7C2A640F670A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {30024C57-CF88-4890-AD9F-7C2A640F670A}.Release|Any CPU.Build.0 = Release|Any CPU - {3E56B4AA-38B0-4255-B2A2-83334132DB21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3E56B4AA-38B0-4255-B2A2-83334132DB21}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3E56B4AA-38B0-4255-B2A2-83334132DB21}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3E56B4AA-38B0-4255-B2A2-83334132DB21}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {520789E0-F9D1-4836-9674-59D399848716} - EndGlobalSection -EndGlobal diff --git a/its/projects/CSharp.SDK.6/Main/Common.cs b/its/projects/CSharp.SDK.6/Main/Common.cs deleted file mode 100644 index ab68c8f9e..000000000 --- a/its/projects/CSharp.SDK.6/Main/Common.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace CSharp.SDKs -{ - public class Common - { - // FIXME: This line contains S1134 warning - } -} diff --git a/its/projects/CSharp.SDK.6/Main/Main.csproj b/its/projects/CSharp.SDK.6/Main/Main.csproj deleted file mode 100644 index 862da5021..000000000 --- a/its/projects/CSharp.SDK.6/Main/Main.csproj +++ /dev/null @@ -1,8 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> - - <!-- This should be overwritten by targets file to get results --> - <RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild> - </PropertyGroup> -</Project> diff --git a/its/projects/CSharp.SDK.6/UTs/CommonTest.cs b/its/projects/CSharp.SDK.6/UTs/CommonTest.cs deleted file mode 100644 index ef41a6578..000000000 --- a/its/projects/CSharp.SDK.6/UTs/CommonTest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace CSharp.SDKs.Test -{ - [TestClass] - public class CommonTest - { - // FIXME: This line contains S1134 warning in SL, but not in S4NET context due to current test-code support - - [TestMethod] - public void TestMethodWithNoAssertion() // S2699: Add at least one assertion to this test case. This rule has test-only scope. - { - var sut = new Common(); - sut.ToString(); - } - } -} diff --git a/its/projects/CSharp.SDK.6/UTs/UTs.csproj b/its/projects/CSharp.SDK.6/UTs/UTs.csproj deleted file mode 100644 index 744e6db67..000000000 --- a/its/projects/CSharp.SDK.6/UTs/UTs.csproj +++ /dev/null @@ -1,15 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> - - <!-- This should be overwritten by targets file to get results --> - <RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild> - </PropertyGroup> - <ItemGroup> - <PackageReference Include="MSTest.TestAdapter" Version="3.6.1" /> - <PackageReference Include="MSTest.TestFramework" Version="3.6.1" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Main\Main.csproj" /> - </ItemGroup> -</Project> diff --git a/its/projects/DuplicateAnalyzerReferences/global.json b/its/projects/DuplicateAnalyzerReferences/global.json index 68eeba67e..d5bf446d0 100644 --- a/its/projects/DuplicateAnalyzerReferences/global.json +++ b/its/projects/DuplicateAnalyzerReferences/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.300", + "version": "9.0.100", "rollForward": "latestFeature" } } \ No newline at end of file diff --git a/its/projects/RazorWebApplication.net6.withoutSourceGenerators/global.json b/its/projects/RazorWebApplication.net6.withoutSourceGenerators/global.json deleted file mode 100644 index 778f056e6..000000000 --- a/its/projects/RazorWebApplication.net6.withoutSourceGenerators/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "sdk": { - "version": "6.0.0", - "rollForward": "latestFeature" - } -} \ No newline at end of file diff --git a/its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication.net6.withSourceGenerators.sln b/its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication.withSourceGenerators.sln similarity index 100% rename from its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication.net6.withSourceGenerators.sln rename to its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication.withSourceGenerators.sln diff --git a/its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication/Index.cshtml b/its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication/Index.cshtml similarity index 100% rename from its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication/Index.cshtml rename to its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication/Index.cshtml diff --git a/its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication/Program.cs b/its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication/Program.cs similarity index 100% rename from its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication/Program.cs rename to its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication/Program.cs diff --git a/its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication/Properties/launchSettings.json b/its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication/Properties/launchSettings.json similarity index 100% rename from its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication/Properties/launchSettings.json rename to its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication/Properties/launchSettings.json diff --git a/its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication/RazorWebApplication.csproj b/its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication/RazorWebApplication.csproj similarity index 80% rename from its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication/RazorWebApplication.csproj rename to its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication/RazorWebApplication.csproj index 84a2257ff..34c93dde6 100644 --- a/its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication/RazorWebApplication.csproj +++ b/its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication/RazorWebApplication.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> </PropertyGroup> <PropertyGroup> diff --git a/its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication/Startup.cs b/its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication/Startup.cs similarity index 100% rename from its/projects/RazorWebApplication.net6.withSourceGenerators/RazorWebApplication/Startup.cs rename to its/projects/RazorWebApplication.net9.withSourceGenerators/RazorWebApplication/Startup.cs diff --git a/its/projects/CSharp.SDK.6/global.json b/its/projects/RazorWebApplication.net9.withSourceGenerators/global.json similarity index 67% rename from its/projects/CSharp.SDK.6/global.json rename to its/projects/RazorWebApplication.net9.withSourceGenerators/global.json index 778f056e6..d5bf446d0 100644 --- a/its/projects/CSharp.SDK.6/global.json +++ b/its/projects/RazorWebApplication.net9.withSourceGenerators/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.0", + "version": "9.0.100", "rollForward": "latestFeature" } } \ No newline at end of file diff --git a/its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication.net6.withoutSourceGenerators.sln b/its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication.withoutSourceGenerators.sln similarity index 100% rename from its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication.net6.withoutSourceGenerators.sln rename to its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication.withoutSourceGenerators.sln diff --git a/its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication/Index.cshtml b/its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication/Index.cshtml similarity index 100% rename from its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication/Index.cshtml rename to its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication/Index.cshtml diff --git a/its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication/Program.cs b/its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication/Program.cs similarity index 100% rename from its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication/Program.cs rename to its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication/Program.cs diff --git a/its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication/Properties/launchSettings.json b/its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication/Properties/launchSettings.json similarity index 100% rename from its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication/Properties/launchSettings.json rename to its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication/Properties/launchSettings.json diff --git a/its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication/RazorWebApplication.csproj b/its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication/RazorWebApplication.csproj similarity index 80% rename from its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication/RazorWebApplication.csproj rename to its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication/RazorWebApplication.csproj index 9eef9c97f..b0019b14f 100644 --- a/its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication/RazorWebApplication.csproj +++ b/its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication/RazorWebApplication.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> </PropertyGroup> <PropertyGroup> diff --git a/its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication/Startup.cs b/its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication/Startup.cs similarity index 100% rename from its/projects/RazorWebApplication.net6.withoutSourceGenerators/RazorWebApplication/Startup.cs rename to its/projects/RazorWebApplication.net9.withoutSourceGenerators/RazorWebApplication/Startup.cs diff --git a/its/projects/RazorWebApplication.net6.withSourceGenerators/global.json b/its/projects/RazorWebApplication.net9.withoutSourceGenerators/global.json similarity index 67% rename from its/projects/RazorWebApplication.net6.withSourceGenerators/global.json rename to its/projects/RazorWebApplication.net9.withoutSourceGenerators/global.json index 778f056e6..d5bf446d0 100644 --- a/its/projects/RazorWebApplication.net6.withSourceGenerators/global.json +++ b/its/projects/RazorWebApplication.net9.withoutSourceGenerators/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.0", + "version": "9.0.100", "rollForward": "latestFeature" } } \ No newline at end of file diff --git a/its/projects/TwoDrivesThreeProjects/DefaultDrive/DefaultDriveFirstProject.csproj b/its/projects/TwoDrivesThreeProjects/DefaultDrive/DefaultDriveFirstProject.csproj index 74abf5c97..694035b3a 100644 --- a/its/projects/TwoDrivesThreeProjects/DefaultDrive/DefaultDriveFirstProject.csproj +++ b/its/projects/TwoDrivesThreeProjects/DefaultDrive/DefaultDriveFirstProject.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> diff --git a/its/projects/TwoDrivesThreeProjects/DefaultDriveSecondProject/DefaultDriveSecondProject.vbproj b/its/projects/TwoDrivesThreeProjects/DefaultDriveSecondProject/DefaultDriveSecondProject.vbproj index 9f2a79d81..ee82ae741 100644 --- a/its/projects/TwoDrivesThreeProjects/DefaultDriveSecondProject/DefaultDriveSecondProject.vbproj +++ b/its/projects/TwoDrivesThreeProjects/DefaultDriveSecondProject/DefaultDriveSecondProject.vbproj @@ -3,7 +3,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> <RootNamespace>DefaultDriveSecondProject</RootNamespace> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> </PropertyGroup> </Project> diff --git a/its/projects/TwoDrivesThreeProjects/DriveY/Subfolder/DriveY.csproj b/its/projects/TwoDrivesThreeProjects/DriveY/Subfolder/DriveY.csproj index 74abf5c97..694035b3a 100644 --- a/its/projects/TwoDrivesThreeProjects/DriveY/Subfolder/DriveY.csproj +++ b/its/projects/TwoDrivesThreeProjects/DriveY/Subfolder/DriveY.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> diff --git a/its/projects/TwoDrivesTwoProjects/DefaultDrive/DefaultDrive.csproj b/its/projects/TwoDrivesTwoProjects/DefaultDrive/DefaultDrive.csproj index 74abf5c97..694035b3a 100644 --- a/its/projects/TwoDrivesTwoProjects/DefaultDrive/DefaultDrive.csproj +++ b/its/projects/TwoDrivesTwoProjects/DefaultDrive/DefaultDrive.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> diff --git a/its/projects/TwoDrivesTwoProjects/DriveZ/Subfolder/DriveZ.csproj b/its/projects/TwoDrivesTwoProjects/DriveZ/Subfolder/DriveZ.csproj index 74abf5c97..694035b3a 100644 --- a/its/projects/TwoDrivesTwoProjects/DriveZ/Subfolder/DriveZ.csproj +++ b/its/projects/TwoDrivesTwoProjects/DriveZ/Subfolder/DriveZ.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> diff --git a/its/projects/VueWithAspBackend/AspBackend/AspBackend.csproj b/its/projects/VueWithAspBackend/AspBackend/AspBackend.csproj index 60bf9ead8..071ea9298 100644 --- a/its/projects/VueWithAspBackend/AspBackend/AspBackend.csproj +++ b/its/projects/VueWithAspBackend/AspBackend/AspBackend.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net9.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> </PropertyGroup> diff --git a/its/src/test/java/com/sonar/it/scanner/msbuild/sonarqube/ScannerMSBuildTest.java b/its/src/test/java/com/sonar/it/scanner/msbuild/sonarqube/ScannerMSBuildTest.java index 8965f17f6..eca348dc5 100644 --- a/its/src/test/java/com/sonar/it/scanner/msbuild/sonarqube/ScannerMSBuildTest.java +++ b/its/src/test/java/com/sonar/it/scanner/msbuild/sonarqube/ScannerMSBuildTest.java @@ -606,17 +606,17 @@ void testXamlCompilation() throws IOException { } @Test - void testRazorCompilationNet6WithoutSourceGenerators() throws IOException { + void testRazorCompilationNet9WithoutSourceGenerators() throws IOException { assumeTrue(TestUtils.getMsBuildPath(ORCHESTRATOR).toString().contains("2022")); // We can't build without MsBuild17 - String projectName = "RazorWebApplication.net6.withoutSourceGenerators"; + String projectName = "RazorWebApplication.net9.withoutSourceGenerators"; assertProjectFileContains(projectName, "<UseRazorSourceGenerator>false</UseRazorSourceGenerator>"); validateRazorProject(projectName); } @Test - void testRazorCompilationNet6WithSourceGenerators() throws IOException { + void testRazorCompilationNet9WithSourceGenerators() throws IOException { assumeTrue(TestUtils.getMsBuildPath(ORCHESTRATOR).toString().contains("2022")); // We can't build without MsBuild17 - String projectName = "RazorWebApplication.net6.withSourceGenerators"; + String projectName = "RazorWebApplication.net9.withSourceGenerators"; assertProjectFileContains(projectName, "<UseRazorSourceGenerator>true</UseRazorSourceGenerator>"); validateRazorProject(projectName); } @@ -782,23 +782,6 @@ void testCSharpFramework48() throws IOException { } } - @Test - void testCSharpSdk6() throws IOException { - validateCSharpSdk("CSharp.SDK.6"); - } - - @Test - void testScannerNet6NoAnalysisWarnings() throws IOException { - // dotnet sdk tests should run only on VS 2022 - assumeTrue(TestUtils.getMsBuildPath(ORCHESTRATOR).toString().contains("2022")); - - Path projectDir = TestUtils.projectDir(basePath, "CSharp.SDK.6"); - BuildResult buildResult = runNetCoreBeginBuildAndEnd(projectDir, ScannerClassifier.NET); - - assertThat(buildResult.getLogs()).doesNotContain("Failed to parse properties from the environment variable 'SONARQUBE_SCANNER_PARAMS'"); - assertUIWarnings(buildResult); - } - @Test void testCSharpSdk8() throws IOException { validateCSharpSdk("CSharp.SDK.8");