diff --git a/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj b/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj index ab5cc92e424352..14a99e98aad289 100644 --- a/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj +++ b/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj @@ -21,9 +21,6 @@ $(Description) Microsoft.Diagnostics.Tools.Pgo Major - - 10 diff --git a/src/libraries/Common/tests/StaticTestGenerator/Program.cs b/src/libraries/Common/tests/StaticTestGenerator/Program.cs index bd81a9e53f2d2d..f5c2e72f1537a0 100644 --- a/src/libraries/Common/tests/StaticTestGenerator/Program.cs +++ b/src/libraries/Common/tests/StaticTestGenerator/Program.cs @@ -199,9 +199,10 @@ public static void Main(string[] args) // Write out the associated .csproj string csprojPath = Path.Combine(outputPath, Path.GetFileNameWithoutExtension(testAssemblyPath) + "-runner.csproj"); + Version version = Environment.Version; File.WriteAllText( csprojPath, - CSProjTemplate + GetCsprojTemplate($"net{version.Major}.{version.Minor}") .Replace("#HelperAssemblyLocation#", Path.GetDirectoryName(testAssemblyPath) + Path.DirectorySeparatorChar) .Replace("#TestAssembly#", Path.GetFullPath(testAssemblyPath)) .Replace("#TestAssemblyLocation#", testAssemblyPath)); @@ -1127,13 +1128,11 @@ public void WriteLine(string format, params object[] args) } "; - /// The template for the .csproj. - private const string CSProjTemplate = -@" + private string GetCsprojTemplate(string targetFramework) => +$@" Exe - net5.0 - preview + {targetFramework} true IDE0049 diff --git a/src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj b/src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj index 035387e854df3e..ae6943c0f9245e 100644 --- a/src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj +++ b/src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj @@ -1,9 +1,8 @@ Exe - net6.0 + net7.0 false - preview true true diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj b/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj index 9c22bce30dae9b..6d40be2f856b75 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj @@ -6,8 +6,6 @@ $(NoWarn);SA1205;CA1845 false true - - 10 true Provides Classes that allow you to decouple code logging rich (unserializable) diagnostics/telemetry (e.g. framework) from code that consumes it (e.g. tools) diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj index 7a6f987b2193b8..bb71d66d214c2e 100644 --- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj +++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj @@ -2,7 +2,6 @@ Exe $(NetCoreAppCurrent) - preview enable True diff --git a/src/libraries/System.Private.CoreLib/gen/System.Private.CoreLib.Generators.csproj b/src/libraries/System.Private.CoreLib/gen/System.Private.CoreLib.Generators.csproj index 90d6ae99bb27cb..81673c14071fdf 100644 --- a/src/libraries/System.Private.CoreLib/gen/System.Private.CoreLib.Generators.csproj +++ b/src/libraries/System.Private.CoreLib/gen/System.Private.CoreLib.Generators.csproj @@ -1,7 +1,6 @@ netstandard2.0 - 10.0 $(NoWarn);CS3001 diff --git a/src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj b/src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj index 26b5733684c3f5..173f2557d23c35 100644 --- a/src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj +++ b/src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj @@ -2,8 +2,7 @@ Exe - net6.0 - latest + net7.0 enable diff --git a/src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj b/src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj index b4093c31ad6408..55d1e87b634d60 100644 --- a/src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj +++ b/src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj @@ -3,7 +3,6 @@ Exe 1 enable - 9.0 true diff --git a/src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj b/src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj index 4ec25161d26f0f..0264633246cb59 100644 --- a/src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj +++ b/src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj @@ -3,7 +3,6 @@ Exe 1 enable - 9.0 true