diff --git a/.vscode/launch.json b/.vscode/launch.json
index 623dd170dfb88..0abfe19735223 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -10,9 +10,9 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
- "program": "${workspaceFolder}/artifacts/bin/BuildValidator/Debug/net6.0/BuildValidator.dll",
+ "program": "${workspaceFolder}/artifacts/bin/BuildValidator/Debug/net7.0/BuildValidator.dll",
"args": [
- "--assembliesPath", "./artifacts/obj/csc/Debug/net6.0",
+ "--assembliesPath", "./artifacts/obj/csc/Debug/net7.0",
"--referencesPath", "./artifacts/bin",
"--referencesPath", "C:/Program Files/dotnet/packs/Microsoft.AspNetCore.App.Ref",
"--referencesPath", "C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref",
@@ -29,8 +29,8 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
- "program": "${workspaceFolder}/artifacts/bin/RunTests/Debug/net6.0/RunTests.dll",
- "args": ["--tfm", "net6.0", "--sequential", "--html"],
+ "program": "${workspaceFolder}/artifacts/bin/RunTests/Debug/net7.0/RunTests.dll",
+ "args": ["--tfm", "net7.0", "--sequential", "--html"],
"cwd": "${workspaceFolder}/artifacts/bin/RunTests",
"stopAtEntry": false,
"console": "internalConsole"
@@ -41,7 +41,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
- "program": "${workspaceFolder}/artifacts/bin/PrepareTests/Debug/net6.0/PrepareTests.dll",
+ "program": "${workspaceFolder}/artifacts/bin/PrepareTests/Debug/net7.0/PrepareTests.dll",
"args": [
"--source", "${workspaceFolder}",
"--destination", "${workspaceFolder}/artifacts/testPayload"
@@ -56,7 +56,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
- "program": "${workspaceFolder}/artifacts/bin/csc/Debug/net6.0/csc.dll",
+ "program": "${workspaceFolder}/artifacts/bin/csc/Debug/net7.0/csc.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Compilers/CSharp/csc",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
diff --git a/eng/Versions.props b/eng/Versions.props
index 967a63642eac2..93e8074b14240 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -236,7 +236,7 @@
0.3.0-alpha.19577.1
6.0.0
6.0.0
- 6.0.0
+ 7.0.0-rtm.22504.4
4.3.0
4.3.0
5.0.0
diff --git a/eng/build.ps1 b/eng/build.ps1
index 6a27f139c80ac..d7c0c4392825f 100644
--- a/eng/build.ps1
+++ b/eng/build.ps1
@@ -369,7 +369,7 @@ function TestUsingRunTests() {
$env:ROSLYN_TEST_USEDASSEMBLIES = "true"
}
- $runTests = GetProjectOutputBinary "RunTests.dll" -tfm "net6.0"
+ $runTests = GetProjectOutputBinary "RunTests.dll" -tfm "net7.0"
if (!(Test-Path $runTests)) {
Write-Host "Test runner not found: '$runTests'. Run Build.cmd first." -ForegroundColor Red
@@ -382,12 +382,12 @@ function TestUsingRunTests() {
$args += " --configuration $configuration"
if ($testCoreClr) {
- $args += " --tfm net6.0"
+ $args += " --tfm net7.0"
$args += " --timeout 90"
if ($testCompilerOnly) {
$args += GetCompilerTestAssembliesIncludePaths
} else {
- $args += " --tfm net6.0-windows"
+ $args += " --tfm net7.0-windows"
$args += " --include '\.UnitTests'"
}
}
diff --git a/eng/build.sh b/eng/build.sh
index a08cbea099dbf..8814eaa163fba 100755
--- a/eng/build.sh
+++ b/eng/build.sh
@@ -327,6 +327,6 @@ if [[ "$test_core_clr" == true ]]; then
if [[ "$ci" != true ]]; then
runtests_args="$runtests_args --html"
fi
- dotnet exec "$scriptroot/../artifacts/bin/RunTests/${configuration}/net6.0/RunTests.dll" --tfm net6.0 --configuration ${configuration} --logs ${log_dir} --dotnet ${_InitializeDotNetCli}/dotnet $runtests_args
+ dotnet exec "$scriptroot/../artifacts/bin/RunTests/${configuration}/net7.0/RunTests.dll" --tfm net7.0 --configuration ${configuration} --logs ${log_dir} --dotnet ${_InitializeDotNetCli}/dotnet $runtests_args
fi
ExitWithExitCode 0
diff --git a/eng/generate-compiler-code.ps1 b/eng/generate-compiler-code.ps1
index abb896ec4215f..3e31dd0a9c31d 100644
--- a/eng/generate-compiler-code.ps1
+++ b/eng/generate-compiler-code.ps1
@@ -22,7 +22,7 @@ function Run-LanguageCore($language, $languageSuffix, $languageDir, $syntaxProje
$errorFileName = if ($language -eq "CSharp") { "ErrorCode.cs" } else { "Errors.vb" }
$errorFilePath = Join-Path $languageDir "Errors\$errorFileName"
$errorGeneratedFilePath = Join-Path $generatedDir "ErrorFacts.Generated.$($languageSuffix)"
- $targetFramework = "net6.0"
+ $targetFramework = "net7.0"
Create-Directory $generatedDir
Create-Directory $generatedTestDir
@@ -74,7 +74,7 @@ function Run-IOperation($coreDir, $ioperationProject) {
$operationsDir = Join-Path $coreDir "Operations"
$operationsXml = Join-Path $operationsDir "OperationInterfaces.xml"
$generationDir = Join-Path $coreDir "Generated"
- $targetFramework = "net6.0"
+ $targetFramework = "net7.0"
if (-not $test) {
Run-Tool $ioperationProject "`"$operationsXml`" `"$generationDir`"" $targetFramework
@@ -91,7 +91,7 @@ function Run-GetTextCore($generatedDir) {
$syntaxTextFilePath = Join-Path $generatedDir "Syntax.xml.GetText.Generated.vb"
Create-Directory $generatedDir
- Run-Tool $basicSyntaxProject "`"$syntaxFilePath`" `"$syntaxTextFilePath`" /gettext" "net6.0"
+ Run-Tool $basicSyntaxProject "`"$syntaxFilePath`" `"$syntaxTextFilePath`" /gettext" "net7.0"
}
function Run-GetText() {
diff --git a/eng/pipelines/test-unix-job.yml b/eng/pipelines/test-unix-job.yml
index a0120fbd9cbf4..5b6729a8888dd 100644
--- a/eng/pipelines/test-unix-job.yml
+++ b/eng/pipelines/test-unix-job.yml
@@ -36,7 +36,7 @@ jobs:
- task: ShellScript@2
displayName: Rehydrate RunTests
inputs:
- scriptPath: ./artifacts/bin/RunTests/${{ parameters.configuration }}/net6.0/rehydrate.sh
+ scriptPath: ./artifacts/bin/RunTests/${{ parameters.configuration }}/net7.0/rehydrate.sh
env:
HELIX_CORRELATION_PAYLOAD: '$(Build.SourcesDirectory)/.duplicate'
diff --git a/eng/pipelines/test-windows-job-single-machine.yml b/eng/pipelines/test-windows-job-single-machine.yml
index fb640cc819878..36d9adf5227d5 100644
--- a/eng/pipelines/test-windows-job-single-machine.yml
+++ b/eng/pipelines/test-windows-job-single-machine.yml
@@ -31,12 +31,12 @@ jobs:
steps:
- checkout: none
- # A .NET 6 runtime is needed since our unit tests target net6.0
+ # A .NET 7 runtime is needed since our unit tests target net7.0
- task: UseDotNet@2
- displayName: 'Install .NET 6 Runtime'
+ displayName: 'Install .NET 7 Runtime'
inputs:
packageType: runtime
- version: 6.0.8
+ version: 7.0.1
installationPath: '$(Build.SourcesDirectory)/.dotnet'
- task: DownloadPipelineArtifact@2
diff --git a/eng/pipelines/test-windows-job.yml b/eng/pipelines/test-windows-job.yml
index 8a63210991e24..5484f13af74cf 100644
--- a/eng/pipelines/test-windows-job.yml
+++ b/eng/pipelines/test-windows-job.yml
@@ -36,7 +36,7 @@ jobs:
- task: BatchScript@1
displayName: Rehydrate RunTests
inputs:
- filename: ./artifacts/bin/RunTests/${{ parameters.configuration }}/net6.0/rehydrate.cmd
+ filename: ./artifacts/bin/RunTests/${{ parameters.configuration }}/net7.0/rehydrate.cmd
env:
HELIX_CORRELATION_PAYLOAD: '$(Build.SourcesDirectory)\.duplicate'
diff --git a/eng/prepare-tests.ps1 b/eng/prepare-tests.ps1
index 2d2bd79c8296f..8e6ca2961278b 100644
--- a/eng/prepare-tests.ps1
+++ b/eng/prepare-tests.ps1
@@ -11,7 +11,7 @@ try {
$dotnet = Ensure-DotnetSdk
# permissions issues make this a pain to do in PrepareTests itself.
Remove-Item -Recurse -Force "$RepoRoot\artifacts\testPayload" -ErrorAction SilentlyContinue
- Exec-Console $dotnet "$RepoRoot\artifacts\bin\PrepareTests\$configuration\net6.0\PrepareTests.dll --source $RepoRoot --destination $RepoRoot\artifacts\testPayload --dotnetPath `"$dotnet`""
+ Exec-Console $dotnet "$RepoRoot\artifacts\bin\PrepareTests\$configuration\net7.0\PrepareTests.dll --source $RepoRoot --destination $RepoRoot\artifacts\testPayload --dotnetPath `"$dotnet`""
exit 0
}
catch {
diff --git a/eng/prepare-tests.sh b/eng/prepare-tests.sh
index 4d6cff2d5da83..1350d62ad7485 100755
--- a/eng/prepare-tests.sh
+++ b/eng/prepare-tests.sh
@@ -28,4 +28,4 @@ InitializeDotNetCli true
# permissions issues make this a pain to do in PrepareTests itself.
rm -rf "$repo_root/artifacts/testPayload"
-dotnet "$repo_root/artifacts/bin/PrepareTests/Debug/net6.0/PrepareTests.dll" --source "$repo_root" --destination "$repo_root/artifacts/testPayload" --unix --dotnetPath ${_InitializeDotNetCli}/dotnet
\ No newline at end of file
+dotnet "$repo_root/artifacts/bin/PrepareTests/Debug/net7.0/PrepareTests.dll" --source "$repo_root" --destination "$repo_root/artifacts/testPayload" --unix --dotnetPath ${_InitializeDotNetCli}/dotnet
\ No newline at end of file
diff --git a/eng/targets/Settings.props b/eng/targets/Settings.props
index ec518e078d723..39862a160f43c 100644
--- a/eng/targets/Settings.props
+++ b/eng/targets/Settings.props
@@ -71,7 +71,7 @@
These may be overridden by projects that need to be skipped.
-->
net46;net472
- net6.0
+ net7.0
$(MSBuildThisFileDirectory)..\config\xunit.runner.json
$(MSBuildThisFileDirectory)..\config\xunit.runner.json
diff --git a/src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs b/src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
index 4982f73eaff0e..dcb3033e3bec5 100644
--- a/src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
+++ b/src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
@@ -379,7 +379,11 @@ public void RunWithShiftJisFile()
[ConditionalFact(typeof(WindowsDesktopOnly), Reason = "https://github.com/dotnet/roslyn/issues/30321")]
public void CompilerBinariesAreAnyCPU()
{
+ // TODO2
+ // warning SYSLIB0037: 'AssemblyName.ProcessorArchitecture' is obsolete: 'AssemblyName members HashAlgorithm, ProcessorArchitecture, and VersionCompatibility are obsolete and not supported.'
+#pragma warning disable SYSLIB0037
Assert.Equal(ProcessorArchitecture.MSIL, AssemblyName.GetAssemblyName(s_CSharpCompilerExecutable).ProcessorArchitecture);
+#pragma warning restore SYSLIB0037
}
[Fact]
@@ -8615,7 +8619,7 @@ public void FileShareDeleteCompatibility_Windows()
fsDll.Dispose();
fsPdb.Dispose();
- AssertEx.Equal(new[] { "Lib.cs", "Lib.dll", "Lib.pdb" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order());
+ AssertEx.Equal(new[] { "Lib.cs", "Lib.dll", "Lib.pdb" }, Roslyn.Utilities.EnumerableExtensions.Order(Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p))));
}
///
@@ -8672,7 +8676,7 @@ public void FileShareDeleteCompatibility_Xplat()
peDll.Dispose();
pePdb.Dispose();
- AssertEx.Equal(new[] { "Lib.cs", "Lib.dll", "Lib.pdb" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order());
+ AssertEx.Equal(new[] { "Lib.cs", "Lib.dll", "Lib.pdb" }, Roslyn.Utilities.EnumerableExtensions.Order(Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p))));
// files can be deleted now:
File.Delete(libSrc.Path);
@@ -8713,7 +8717,7 @@ public void FileShareDeleteCompatibility_ReadOnlyFiles()
fsDll.Dispose();
- AssertEx.Equal(new[] { "Lib.cs", "Lib.dll" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order());
+ AssertEx.Equal(new[] { "Lib.cs", "Lib.dll" }, Roslyn.Utilities.EnumerableExtensions.Order(Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p))));
}
[Fact]
diff --git a/src/Compilers/CSharp/Test/CommandLine/Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj b/src/Compilers/CSharp/Test/CommandLine/Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj
index 127bbc17aafc2..43d7fa7d45b14 100644
--- a/src/Compilers/CSharp/Test/CommandLine/Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj
+++ b/src/Compilers/CSharp/Test/CommandLine/Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj
@@ -4,7 +4,7 @@
Library
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests
- net6.0;net472
+ net7.0;net472
true
diff --git a/src/Compilers/CSharp/Test/Emit/Microsoft.CodeAnalysis.CSharp.Emit.UnitTests.csproj b/src/Compilers/CSharp/Test/Emit/Microsoft.CodeAnalysis.CSharp.Emit.UnitTests.csproj
index 238c253b9cb1c..27f2ea81b0670 100644
--- a/src/Compilers/CSharp/Test/Emit/Microsoft.CodeAnalysis.CSharp.Emit.UnitTests.csproj
+++ b/src/Compilers/CSharp/Test/Emit/Microsoft.CodeAnalysis.CSharp.Emit.UnitTests.csproj
@@ -4,7 +4,7 @@
Library
Microsoft.CodeAnalysis.CSharp.UnitTests
- net6.0;net472
+ net7.0;net472
true
diff --git a/src/Compilers/CSharp/Test/Emit2/Diagnostics/DiagnosticSuppressorTests.cs b/src/Compilers/CSharp/Test/Emit2/Diagnostics/DiagnosticSuppressorTests.cs
index 9460fa67eaeb2..b2808db170bf5 100644
--- a/src/Compilers/CSharp/Test/Emit2/Diagnostics/DiagnosticSuppressorTests.cs
+++ b/src/Compilers/CSharp/Test/Emit2/Diagnostics/DiagnosticSuppressorTests.cs
@@ -563,7 +563,7 @@ public void TestProgrammaticSuppressionInfo_DiagnosticSuppressor()
Assert.Single(diagnostics);
var programmaticSuppression = diagnostics.Select(d => d.ProgrammaticSuppressionInfo).Single();
Assert.Equal(2, programmaticSuppression.Suppressions.Count);
- var orderedSuppressions = programmaticSuppression.Suppressions.Order().ToImmutableArrayOrEmpty();
+ var orderedSuppressions = Roslyn.Utilities.EnumerableExtensions.Order(programmaticSuppression.Suppressions).ToImmutableArrayOrEmpty();
Assert.Equal(suppressionId, orderedSuppressions[0].Id);
Assert.Equal(suppressor.SuppressionDescriptor.Justification, orderedSuppressions[0].Justification);
Assert.Equal(suppressionId2, orderedSuppressions[1].Id);
diff --git a/src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs b/src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs
index ff3c3e0fa744c..844b682470245 100644
--- a/src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs
+++ b/src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs
@@ -22,18 +22,12 @@
using Roslyn.Test.Utilities;
using Roslyn.Utilities;
using Xunit;
-using ReferenceEqualityComparer = Roslyn.Utilities.ReferenceEqualityComparer;
namespace Microsoft.CodeAnalysis.CSharp.UnitTests.Semantics
{
public class NumericIntPtrTests : CSharpTestBase
{
- private static string IncludeExpectedOutput(string expectedOutput) =>
-#if NET7_0_OR_GREATER
- expectedOutput ;
-#else
- null;
-#endif
+ private static string IncludeExpectedOutput(string expectedOutput) => ExecutionConditionUtil.IsCoreClr ? expectedOutput : null;
internal static readonly ConversionKind[] Identity = new[] { ConversionKind.Identity };
internal static readonly ConversionKind[] NoConversion = new[] { ConversionKind.NoConversion };
diff --git a/src/Compilers/CSharp/Test/Emit2/Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests.csproj b/src/Compilers/CSharp/Test/Emit2/Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests.csproj
index 238c253b9cb1c..27f2ea81b0670 100644
--- a/src/Compilers/CSharp/Test/Emit2/Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests.csproj
+++ b/src/Compilers/CSharp/Test/Emit2/Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests.csproj
@@ -4,7 +4,7 @@
Library
Microsoft.CodeAnalysis.CSharp.UnitTests
- net6.0;net472
+ net7.0;net472
true
diff --git a/src/Compilers/CSharp/Test/EndToEnd/Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests.csproj b/src/Compilers/CSharp/Test/EndToEnd/Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests.csproj
index d14796cc26fd9..e12828f7a832c 100644
--- a/src/Compilers/CSharp/Test/EndToEnd/Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests.csproj
+++ b/src/Compilers/CSharp/Test/EndToEnd/Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests.csproj
@@ -4,7 +4,7 @@
Library
Microsoft.CodeAnalysis.CSharp.UnitTests
- net6.0;net472
+ net7.0;net472
true
diff --git a/src/Compilers/CSharp/Test/IOperation/Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests.csproj b/src/Compilers/CSharp/Test/IOperation/Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests.csproj
index 44a495ff26660..db9bcc479afa8 100644
--- a/src/Compilers/CSharp/Test/IOperation/Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests.csproj
+++ b/src/Compilers/CSharp/Test/IOperation/Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests.csproj
@@ -4,7 +4,7 @@
Library
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests
- net6.0;net472
+ net7.0;net472
diff --git a/src/Compilers/CSharp/Test/Semantic/Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests.csproj b/src/Compilers/CSharp/Test/Semantic/Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests.csproj
index 1c392ec2d10dd..8ff52a5e09b57 100644
--- a/src/Compilers/CSharp/Test/Semantic/Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests.csproj
+++ b/src/Compilers/CSharp/Test/Semantic/Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests.csproj
@@ -4,7 +4,7 @@
Library
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests
- net6.0;net472
+ net7.0;net472
diff --git a/src/Compilers/CSharp/Test/Semantic/Semantics/ObjectAndCollectionInitializerTests.cs b/src/Compilers/CSharp/Test/Semantic/Semantics/ObjectAndCollectionInitializerTests.cs
index 2bbf936a2b2e2..61075f1fb3320 100644
--- a/src/Compilers/CSharp/Test/Semantic/Semantics/ObjectAndCollectionInitializerTests.cs
+++ b/src/Compilers/CSharp/Test/Semantic/Semantics/ObjectAndCollectionInitializerTests.cs
@@ -3510,7 +3510,7 @@ where node.IsKind(SyntaxKind.CollectionInitializerExpression)
Assert.Equal(2, symbolInfo.CandidateSymbols.Length);
Assert.Equal(new[] {"void X.Add(System.Collections.Generic.List x)",
"void X.Add(X x)"},
- symbolInfo.CandidateSymbols.Select(s => s.ToTestDisplayString()).Order().ToArray());
+ Roslyn.Utilities.EnumerableExtensions.Order(symbolInfo.CandidateSymbols.Select(s => s.ToTestDisplayString())).ToArray());
}
[WorkItem(529787, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/529787")]
diff --git a/src/Compilers/CSharp/Test/Semantic/Semantics/RefFieldTests.cs b/src/Compilers/CSharp/Test/Semantic/Semantics/RefFieldTests.cs
index d6322012a610b..0c12ab523fb92 100644
--- a/src/Compilers/CSharp/Test/Semantic/Semantics/RefFieldTests.cs
+++ b/src/Compilers/CSharp/Test/Semantic/Semantics/RefFieldTests.cs
@@ -20,24 +20,7 @@ namespace Microsoft.CodeAnalysis.CSharp.UnitTests
{
public class RefFieldTests : CSharpTestBase
{
- private static bool IsNet70OrGreater()
- {
-#if NET7_0_OR_GREATER
- return true;
-#else
- return false;
-#endif
- }
-
- private static string IncludeExpectedOutput(string expectedOutput) => IsNet70OrGreater() ? expectedOutput : null;
-
- private static IEnumerable CopyWithoutSharingCachedSymbols(IEnumerable references)
- {
- foreach (var reference in references)
- {
- yield return ((AssemblyMetadata)((MetadataImageReference)reference).GetMetadata()).CopyWithoutSharingCachedSymbols().GetReference();
- }
- }
+ private static string IncludeExpectedOutput(string expectedOutput) => ExecutionConditionUtil.IsCoreClr ? expectedOutput : null;
[CombinatorialData]
[Theory]
diff --git a/src/Compilers/CSharp/Test/Symbol/Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests.csproj b/src/Compilers/CSharp/Test/Symbol/Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests.csproj
index 65c51a84985e6..8c60405ebc693 100644
--- a/src/Compilers/CSharp/Test/Symbol/Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests.csproj
+++ b/src/Compilers/CSharp/Test/Symbol/Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests.csproj
@@ -5,7 +5,7 @@
Library
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests
true
- net6.0;net472
+ net7.0;net472
true
diff --git a/src/Compilers/CSharp/Test/Symbol/Symbols/DefaultInterfaceImplementationTests.cs b/src/Compilers/CSharp/Test/Symbol/Symbols/DefaultInterfaceImplementationTests.cs
index 9b4d75e2af10d..8f2147d8229cd 100644
--- a/src/Compilers/CSharp/Test/Symbol/Symbols/DefaultInterfaceImplementationTests.cs
+++ b/src/Compilers/CSharp/Test/Symbol/Symbols/DefaultInterfaceImplementationTests.cs
@@ -51,8 +51,15 @@ private static Verification Verify(bool isStatic)
return isStatic ? Verification.Skipped : VerifyOnMonoOrCoreClr;
}
- private static bool Execute(bool isStatic, bool haveImplementationInDerivedInterface = false)
+ private static bool Execute(bool isStatic, bool haveImplementationInDerivedInterface = false, bool hasImplementationOfStaticVirtualInDerivedType = false)
{
+ // The runtime ignores the implementation of a static virtual method in derived types
+ // Tracked by https://github.com/dotnet/roslyn/issues/64501
+ if (hasImplementationOfStaticVirtualInDerivedType)
+ {
+ return false;
+ }
+
// https://github.com/dotnet/roslyn/issues/61321 : Enable execution for isStatic and haveImplementationInDerivedInterface once runtime can handle it.
if (!ExecutionConditionUtil.IsMonoOrCoreClr || (isStatic && haveImplementationInDerivedInterface))
{
@@ -804,7 +811,7 @@ void Validate(ModuleSymbol m)
Validate(compilation1.SourceModule);
CompileAndVerify(compilation1,
- expectedOutput: !Execute(isStatic) ? null :
+ expectedOutput: !Execute(isStatic, hasImplementationOfStaticVirtualInDerivedType: true) ? null :
@"Test.M1
Test.M2",
verify: Verify(isStatic),
@@ -906,7 +913,7 @@ void Validate(ModuleSymbol m)
Validate(compilation1.SourceModule);
CompileAndVerify(compilation1,
- expectedOutput: !Execute(isStatic) ? null :
+ expectedOutput: !Execute(isStatic, hasImplementationOfStaticVirtualInDerivedType: true) ? null :
@"Test.M1
Test.M2",
verify: Verify(isStatic),
@@ -1139,7 +1146,7 @@ class Test2 : I1
Assert.Equal("void Test2.I1.M1()", test1.FindImplementationForInterfaceMember(m1).ToTestDisplayString());
CompileAndVerify(compilation1,
- expectedOutput: Execute(isStatic) ? "Test2.M1" : null,
+ expectedOutput: Execute(isStatic, hasImplementationOfStaticVirtualInDerivedType: true) ? "Test2.M1" : null,
verify: Verify(isStatic),
symbolValidator: (m) =>
{
@@ -1218,7 +1225,7 @@ class Test2 : I1
Assert.Equal("void Test2.M1()", test1.FindImplementationForInterfaceMember(m1).ToTestDisplayString());
CompileAndVerify(compilation1,
- expectedOutput: Execute(isStatic) ? "Test2.M1" : null,
+ expectedOutput: Execute(isStatic, hasImplementationOfStaticVirtualInDerivedType: true) ? "Test2.M1" : null,
verify: Verify(isStatic),
symbolValidator: (m) =>
{
@@ -1472,7 +1479,7 @@ class Test2 : I1
Assert.Equal("System.Int32 Test2.I1.M2()", test1.FindImplementationForInterfaceMember(m2).ToTestDisplayString());
CompileAndVerify(compilation1,
- expectedOutput: !Execute(isStatic) ? null :
+ expectedOutput: !Execute(isStatic, hasImplementationOfStaticVirtualInDerivedType: true) ? null :
@"Test2.M1
2",
verify: Verify(isStatic),
@@ -1560,7 +1567,7 @@ class Test2 : I1
Assert.Equal("System.Int32 Test2.M2()", test1.FindImplementationForInterfaceMember(m2).ToTestDisplayString());
CompileAndVerify(compilation1,
- expectedOutput: !Execute(isStatic) ? null :
+ expectedOutput: !Execute(isStatic, hasImplementationOfStaticVirtualInDerivedType: true) ? null :
@"Test2.M1
2",
verify: Verify(isStatic),
@@ -3836,7 +3843,7 @@ void Validate(ModuleSymbol m)
Validate(compilation1.SourceModule);
CompileAndVerify(compilation1,
- expectedOutput: !Execute(isStatic) ? null :
+ expectedOutput: !Execute(isStatic, hasImplementationOfStaticVirtualInDerivedType: true) ? null :
@"100
200
300
@@ -3988,7 +3995,7 @@ void Validate(ModuleSymbol m)
Validate(compilation1.SourceModule);
CompileAndVerify(compilation1,
- expectedOutput: !Execute(isStatic) ? null :
+ expectedOutput: !Execute(isStatic, hasImplementationOfStaticVirtualInDerivedType: true) ? null :
@"100
200
300
@@ -6870,7 +6877,7 @@ class Test : I1 {}
ValidateEventImplementation_201(compilation1.SourceModule);
CompileAndVerify(compilation1,
- expectedOutput: !Execute(isStatic) ? null :
+ expectedOutput: !Execute(isStatic, hasImplementationOfStaticVirtualInDerivedType: true) ? null :
@"add E7
remove E7
add E8
@@ -6977,7 +6984,7 @@ void Validate(ModuleSymbol m)
Validate(compilation1.SourceModule);
CompileAndVerify(compilation1,
- expectedOutput: !Execute(isStatic) ? null :
+ expectedOutput: !Execute(isStatic, hasImplementationOfStaticVirtualInDerivedType: true) ? null :
@"add E7
remove E7
add E8
@@ -7084,7 +7091,7 @@ void Validate(ModuleSymbol m)
Validate(compilation1.SourceModule);
CompileAndVerify(compilation1,
- expectedOutput: !Execute(isStatic) ? null :
+ expectedOutput: !Execute(isStatic, hasImplementationOfStaticVirtualInDerivedType: true) ? null :
@"add E7
remove E7
add E8
diff --git a/src/Compilers/CSharp/Test/Syntax/Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests.csproj b/src/Compilers/CSharp/Test/Syntax/Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests.csproj
index 007d6b9f3c3b9..df1f00c8cf507 100644
--- a/src/Compilers/CSharp/Test/Syntax/Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests.csproj
+++ b/src/Compilers/CSharp/Test/Syntax/Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests.csproj
@@ -7,7 +7,7 @@
false
true
true
- net6.0;net472
+ net7.0;net472
$(NoWarn);1570;1587
diff --git a/src/Compilers/Core/CodeAnalysisTest/DefaultAnalyzerAssemblyLoaderTests.cs b/src/Compilers/Core/CodeAnalysisTest/DefaultAnalyzerAssemblyLoaderTests.cs
index 74ee973a5ceb5..25f19a4388306 100644
--- a/src/Compilers/Core/CodeAnalysisTest/DefaultAnalyzerAssemblyLoaderTests.cs
+++ b/src/Compilers/Core/CodeAnalysisTest/DefaultAnalyzerAssemblyLoaderTests.cs
@@ -153,7 +153,7 @@ public void AssemblyLoading_DependencyLocationNotAdded()
private static void VerifyAssemblies(IEnumerable assemblies, params (string simpleName, string version, string path)[] expected)
{
- Assert.Equal(expected, assemblies.Select(assembly => (assembly.GetName().Name!, assembly.GetName().Version!.ToString(), assembly.Location)).Order());
+ Assert.Equal(expected, Roslyn.Utilities.EnumerableExtensions.Order(assemblies.Select(assembly => (assembly.GetName().Name!, assembly.GetName().Version!.ToString(), assembly.Location))));
}
[ConditionalFact(typeof(CoreClrOnly))]
diff --git a/src/Compilers/Core/CodeAnalysisTest/MetadataReferences/AssemblyIdentityTests.cs b/src/Compilers/Core/CodeAnalysisTest/MetadataReferences/AssemblyIdentityTests.cs
index ee0417c80a2b8..e8f6ec1ab3e95 100644
--- a/src/Compilers/Core/CodeAnalysisTest/MetadataReferences/AssemblyIdentityTests.cs
+++ b/src/Compilers/Core/CodeAnalysisTest/MetadataReferences/AssemblyIdentityTests.cs
@@ -89,7 +89,9 @@ public void FromAssemblyDefinition()
name.CultureInfo = new CultureInfo("en-US", useUserOverride: false);
name.ContentType = AssemblyContentType.Default;
name.Version = new Version(1, 2, 3, 4);
+#pragma warning disable SYSLIB0037
name.ProcessorArchitecture = ProcessorArchitecture.X86;
+#pragma warning restore SYSLIB0037
var id = AssemblyIdentity.FromAssemblyDefinition(name);
Assert.Equal("goo", id.Name);
@@ -128,7 +130,9 @@ public void FromAssemblyDefinition_InvariantCulture()
name.CultureInfo = CultureInfo.InvariantCulture;
name.ContentType = AssemblyContentType.Default;
name.Version = new Version(1, 2, 3, 4);
+#pragma warning disable SYSLIB0037
name.ProcessorArchitecture = ProcessorArchitecture.X86;
+#pragma warning restore SYSLIB0037
var id = AssemblyIdentity.FromAssemblyDefinition(name);
Assert.Equal("", id.CultureName);
@@ -311,7 +315,11 @@ public void ToAssemblyName()
AssertEx.Equal(new byte[0], an.GetPublicKeyToken());
AssertEx.Equal(null, an.GetPublicKey());
Assert.Equal(AssemblyNameFlags.None, an.Flags);
+ // TODO2
+ // warning SYSLIB0044: 'AssemblyName.CodeBase' is obsolete: 'AssemblyName.CodeBase and AssemblyName.EscapedCodeBase are obsolete. Using them for loading an assembly is not supported.'
+#pragma warning disable SYSLIB0044
Assert.Null(an.CodeBase);
+#pragma warning restore SYSLIB0044
ai = new AssemblyIdentity("goo", new Version(1, 2, 3, 4), "en-US", RoPublicKey1,
hasPublicKey: true,
@@ -324,7 +332,9 @@ public void ToAssemblyName()
AssertEx.Equal(PublicKeyToken1, an.GetPublicKeyToken());
AssertEx.Equal(PublicKey1, an.GetPublicKey());
Assert.Equal(AssemblyNameFlags.PublicKey | AssemblyNameFlags.Retargetable, an.Flags);
+#pragma warning disable SYSLIB0044
Assert.Null(an.CodeBase);
+#pragma warning restore SYSLIB0044
// invalid characters are ok in the name, the FullName can't be built though:
foreach (char c in ClrInvalidCharacters)
@@ -338,7 +348,9 @@ public void ToAssemblyName()
AssertEx.Equal(new byte[0], an.GetPublicKeyToken());
AssertEx.Equal(null, an.GetPublicKey());
Assert.Equal(AssemblyNameFlags.None, an.Flags);
+#pragma warning disable SYSLIB0044
AssertEx.Equal(null, an.CodeBase);
+#pragma warning restore SYSLIB0044
}
}
diff --git a/src/Compilers/Core/CodeAnalysisTest/Microsoft.CodeAnalysis.UnitTests.csproj b/src/Compilers/Core/CodeAnalysisTest/Microsoft.CodeAnalysis.UnitTests.csproj
index a43e46d8035cb..03d1d2471f4f2 100644
--- a/src/Compilers/Core/CodeAnalysisTest/Microsoft.CodeAnalysis.UnitTests.csproj
+++ b/src/Compilers/Core/CodeAnalysisTest/Microsoft.CodeAnalysis.UnitTests.csproj
@@ -5,7 +5,7 @@
Library
Microsoft.CodeAnalysis.UnitTests
true
- net6.0;net472
+ net7.0;net472
diff --git a/src/Compilers/Core/MSBuildTaskTests/Microsoft.Build.Tasks.CodeAnalysis.UnitTests.csproj b/src/Compilers/Core/MSBuildTaskTests/Microsoft.Build.Tasks.CodeAnalysis.UnitTests.csproj
index 1d515f35f8168..490911cf37c6e 100644
--- a/src/Compilers/Core/MSBuildTaskTests/Microsoft.Build.Tasks.CodeAnalysis.UnitTests.csproj
+++ b/src/Compilers/Core/MSBuildTaskTests/Microsoft.Build.Tasks.CodeAnalysis.UnitTests.csproj
@@ -5,7 +5,7 @@
Library
Microsoft.CodeAnalysis.BuildTasks.UnitTests
true
- net6.0;net472
+ net7.0;net472
true
diff --git a/src/Compilers/Core/RebuildTest/Microsoft.CodeAnalysis.Rebuild.UnitTests.csproj b/src/Compilers/Core/RebuildTest/Microsoft.CodeAnalysis.Rebuild.UnitTests.csproj
index c01139fd1e963..11eb83bbe224b 100644
--- a/src/Compilers/Core/RebuildTest/Microsoft.CodeAnalysis.Rebuild.UnitTests.csproj
+++ b/src/Compilers/Core/RebuildTest/Microsoft.CodeAnalysis.Rebuild.UnitTests.csproj
@@ -5,7 +5,7 @@
Library
Microsoft.CodeAnalysis.Rebuild.UnitTests
true
- net6.0;net472
+ net7.0;net472
diff --git a/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs b/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
index 084293f127f64..a16d8f5775432 100644
--- a/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
+++ b/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
@@ -449,8 +449,12 @@ public void CompilerBinariesAreNotX86()
{
var basePath = Path.GetDirectoryName(typeof(CompilerServerUnitTests).Assembly.Location);
var compilerServerExecutable = Path.Combine(basePath, "VBCSCompiler.exe");
+ // TODO2
+ // warning SYSLIB0037: 'AssemblyName.ProcessorArchitecture' is obsolete: 'AssemblyName members HashAlgorithm, ProcessorArchitecture, and VersionCompatibility are obsolete and not supported.'
+#pragma warning disable SYSLIB0037
Assert.NotEqual(ProcessorArchitecture.X86,
AssemblyName.GetAssemblyName(compilerServerExecutable).ProcessorArchitecture);
+#pragma warning restore SYSLIB0037
}
///
diff --git a/src/Compilers/Server/VBCSCompilerTests/VBCSCompiler.UnitTests.csproj b/src/Compilers/Server/VBCSCompilerTests/VBCSCompiler.UnitTests.csproj
index 8ee6e9160de67..e99bf56944d6a 100644
--- a/src/Compilers/Server/VBCSCompilerTests/VBCSCompiler.UnitTests.csproj
+++ b/src/Compilers/Server/VBCSCompilerTests/VBCSCompiler.UnitTests.csproj
@@ -5,7 +5,7 @@
Library
Microsoft.CodeAnalysis.CompilerServer.UnitTests
true
- net6.0;net472
+ net7.0;net472
diff --git a/src/Compilers/VisualBasic/Test/IOperation/Roslyn.Compilers.VisualBasic.IOperation.UnitTests.vbproj b/src/Compilers/VisualBasic/Test/IOperation/Roslyn.Compilers.VisualBasic.IOperation.UnitTests.vbproj
index 9a9573d6dd6b9..a575e2710ed63 100644
--- a/src/Compilers/VisualBasic/Test/IOperation/Roslyn.Compilers.VisualBasic.IOperation.UnitTests.vbproj
+++ b/src/Compilers/VisualBasic/Test/IOperation/Roslyn.Compilers.VisualBasic.IOperation.UnitTests.vbproj
@@ -3,7 +3,7 @@
Library
- net6.0;net472
+ net7.0;net472
diff --git a/src/Compilers/VisualBasic/Test/Semantic/Binding/BindingCollectionInitializerTests.vb b/src/Compilers/VisualBasic/Test/Semantic/Binding/BindingCollectionInitializerTests.vb
index 7a3c32a664547..1df82543aa036 100644
--- a/src/Compilers/VisualBasic/Test/Semantic/Binding/BindingCollectionInitializerTests.vb
+++ b/src/Compilers/VisualBasic/Test/Semantic/Binding/BindingCollectionInitializerTests.vb
@@ -1849,7 +1849,7 @@ End Class
Assert.Equal(2, symbolInfo.CandidateSymbols.Length)
Assert.Equal({"Sub X.Add(x As System.Collections.Generic.List(Of System.Byte))",
"Sub X.Add(x As X)"},
- symbolInfo.CandidateSymbols.Select(Function(s) s.ToTestDisplayString()).Order().ToArray())
+ Roslyn.Utilities.EnumerableExtensions.Order(symbolInfo.CandidateSymbols.Select(Function(s) s.ToTestDisplayString())).ToArray())
End Sub
diff --git a/src/Compilers/VisualBasic/Test/Semantic/Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj b/src/Compilers/VisualBasic/Test/Semantic/Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj
index 6b3c5cba79e4b..da40b2805f75c 100644
--- a/src/Compilers/VisualBasic/Test/Semantic/Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj
+++ b/src/Compilers/VisualBasic/Test/Semantic/Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj
@@ -3,7 +3,7 @@
Library
- net6.0;net472
+ net7.0;net472
diff --git a/src/Compilers/VisualBasic/Test/Syntax/Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests.vbproj b/src/Compilers/VisualBasic/Test/Syntax/Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests.vbproj
index b82051c771659..cd4be3f8ebbe3 100644
--- a/src/Compilers/VisualBasic/Test/Syntax/Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests.vbproj
+++ b/src/Compilers/VisualBasic/Test/Syntax/Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests.vbproj
@@ -3,7 +3,7 @@
Library
- net6.0;net472
+ net7.0;net472
diff --git a/src/Interactive/HostTest/InteractiveHost.UnitTests.csproj b/src/Interactive/HostTest/InteractiveHost.UnitTests.csproj
index 62b48e61e2beb..2f89f3b4ce210 100644
--- a/src/Interactive/HostTest/InteractiveHost.UnitTests.csproj
+++ b/src/Interactive/HostTest/InteractiveHost.UnitTests.csproj
@@ -4,7 +4,7 @@
Library
Roslyn.InteractiveHost.UnitTests
- net6.0
+ net7.0
diff --git a/src/Scripting/CSharpTest/Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests.csproj b/src/Scripting/CSharpTest/Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests.csproj
index 0828933d1d2ac..5c984fea1da5e 100644
--- a/src/Scripting/CSharpTest/Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests.csproj
+++ b/src/Scripting/CSharpTest/Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests.csproj
@@ -5,7 +5,7 @@
Library
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests
true
- net6.0;net472
+ net7.0;net472
diff --git a/src/Scripting/CoreTest/Microsoft.CodeAnalysis.Scripting.UnitTests.csproj b/src/Scripting/CoreTest/Microsoft.CodeAnalysis.Scripting.UnitTests.csproj
index 51876d7af617f..c97eb8634c4f5 100644
--- a/src/Scripting/CoreTest/Microsoft.CodeAnalysis.Scripting.UnitTests.csproj
+++ b/src/Scripting/CoreTest/Microsoft.CodeAnalysis.Scripting.UnitTests.csproj
@@ -5,7 +5,7 @@
Library
Microsoft.CodeAnalysis.Scripting.Test
true
- net6.0;net472
+ net7.0;net472
diff --git a/src/Scripting/CoreTestUtilities/Microsoft.CodeAnalysis.Scripting.TestUtilities.csproj b/src/Scripting/CoreTestUtilities/Microsoft.CodeAnalysis.Scripting.TestUtilities.csproj
index a758477041bfc..26f1b6c053366 100644
--- a/src/Scripting/CoreTestUtilities/Microsoft.CodeAnalysis.Scripting.TestUtilities.csproj
+++ b/src/Scripting/CoreTestUtilities/Microsoft.CodeAnalysis.Scripting.TestUtilities.csproj
@@ -4,7 +4,7 @@
Library
true
- net472;net6.0
+ net472;net7.0
true
false
true
diff --git a/src/Test/PdbUtilities/Roslyn.Test.PdbUtilities.csproj b/src/Test/PdbUtilities/Roslyn.Test.PdbUtilities.csproj
index 2533d26f9d625..7cbf414a62ed7 100644
--- a/src/Test/PdbUtilities/Roslyn.Test.PdbUtilities.csproj
+++ b/src/Test/PdbUtilities/Roslyn.Test.PdbUtilities.csproj
@@ -4,7 +4,7 @@
Library
Roslyn.Test.PdbUtilities
- net6.0;net472
+ net7.0;net472
true
false
diff --git a/src/Tools/AnalyzerRunner/AnalyzerRunner.csproj b/src/Tools/AnalyzerRunner/AnalyzerRunner.csproj
index d99d5b18fffa4..bf101c9ec5e4c 100644
--- a/src/Tools/AnalyzerRunner/AnalyzerRunner.csproj
+++ b/src/Tools/AnalyzerRunner/AnalyzerRunner.csproj
@@ -4,7 +4,7 @@
Exe
- net6.0;net472
+ net7.0;net472
false
AnyCPU
true
@@ -12,7 +12,7 @@
true
-
+
diff --git a/src/Tools/PrepareTests/PrepareTests.csproj b/src/Tools/PrepareTests/PrepareTests.csproj
index b0c04b5e2db3b..2bce3d82cd086 100644
--- a/src/Tools/PrepareTests/PrepareTests.csproj
+++ b/src/Tools/PrepareTests/PrepareTests.csproj
@@ -3,7 +3,7 @@
Exe
- net6.0
+ net7.0
false
false
false
diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/BoundTreeGenerator/CompilersBoundTreeGenerator.csproj b/src/Tools/Source/CompilerGeneratorTools/Source/BoundTreeGenerator/CompilersBoundTreeGenerator.csproj
index 2eee22c003800..0ca9374ab9645 100644
--- a/src/Tools/Source/CompilerGeneratorTools/Source/BoundTreeGenerator/CompilersBoundTreeGenerator.csproj
+++ b/src/Tools/Source/CompilerGeneratorTools/Source/BoundTreeGenerator/CompilersBoundTreeGenerator.csproj
@@ -9,7 +9,7 @@
Roslyn.Compilers.Internal.BoundTreeGenerator
BoundTreeGenerator
True
- net6.0
+ net7.0
false
diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/CSharpErrorFactsGenerator/CSharpErrorFactsGenerator.csproj b/src/Tools/Source/CompilerGeneratorTools/Source/CSharpErrorFactsGenerator/CSharpErrorFactsGenerator.csproj
index 0781b1afab3a3..b610e76dad197 100644
--- a/src/Tools/Source/CompilerGeneratorTools/Source/CSharpErrorFactsGenerator/CSharpErrorFactsGenerator.csproj
+++ b/src/Tools/Source/CompilerGeneratorTools/Source/CSharpErrorFactsGenerator/CSharpErrorFactsGenerator.csproj
@@ -8,7 +8,7 @@
Exe
Roslyn.Compilers.CSharp.Internal.CSharpErrorFactsGenerator
True
- net6.0
+ net7.0
false
\ No newline at end of file
diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj b/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj
index 7eae8afa2756a..3d912c842d415 100644
--- a/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj
+++ b/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj
@@ -7,9 +7,9 @@
AnyCPU
CSharpSyntaxGenerator
True
-
- net6.0;netstandard2.0
+ net7.0;netstandard2.0
Exe
$(RoslynPortableRuntimeIdentifiers)
false
diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/IOperationGenerator/CompilersIOperationGenerator.csproj b/src/Tools/Source/CompilerGeneratorTools/Source/IOperationGenerator/CompilersIOperationGenerator.csproj
index d77ab5532f705..4d402c3555179 100644
--- a/src/Tools/Source/CompilerGeneratorTools/Source/IOperationGenerator/CompilersIOperationGenerator.csproj
+++ b/src/Tools/Source/CompilerGeneratorTools/Source/IOperationGenerator/CompilersIOperationGenerator.csproj
@@ -6,7 +6,7 @@
Roslyn.Compilers.Internal.IOperationGenerator
IOperationGenerator
True
- net6.0
+ net7.0
false
diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicErrorFactsGenerator/VisualBasicErrorFactsGenerator.vbproj b/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicErrorFactsGenerator/VisualBasicErrorFactsGenerator.vbproj
index 2c0932365b44e..cd11ed703bec4 100644
--- a/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicErrorFactsGenerator/VisualBasicErrorFactsGenerator.vbproj
+++ b/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicErrorFactsGenerator/VisualBasicErrorFactsGenerator.vbproj
@@ -10,7 +10,7 @@
Microsoft.CodeAnalysis.VisualBasic.Internal.VBErrorFactsGenerator
VBErrorFactsGenerator
True
- net6.0
+ net7.0
false
\ No newline at end of file
diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/VisualBasicSyntaxGenerator.vbproj b/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/VisualBasicSyntaxGenerator.vbproj
index 9bea73d8fb3bc..dc03c3cc1cbc2 100644
--- a/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/VisualBasicSyntaxGenerator.vbproj
+++ b/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/VisualBasicSyntaxGenerator.vbproj
@@ -11,7 +11,7 @@
VBSyntaxGenerator
Off
True
- net6.0
+ net7.0
false
diff --git a/src/Tools/Source/RunTests/RunTests.csproj b/src/Tools/Source/RunTests/RunTests.csproj
index 4127eba2b292a..a7d645b1196c7 100644
--- a/src/Tools/Source/RunTests/RunTests.csproj
+++ b/src/Tools/Source/RunTests/RunTests.csproj
@@ -3,7 +3,7 @@
Exe
- net6.0
+ net7.0
true
false
false
diff --git a/src/Workspaces/CSharpTest/Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests.csproj b/src/Workspaces/CSharpTest/Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests.csproj
index 043f4dc6e32e3..3787f4b4187ed 100644
--- a/src/Workspaces/CSharpTest/Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests.csproj
+++ b/src/Workspaces/CSharpTest/Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests.csproj
@@ -4,7 +4,7 @@
Library
Microsoft.CodeAnalysis.CSharp.UnitTests
- net6.0-windows;net472
+ net7.0-windows;net472
diff --git a/src/Workspaces/CoreTest/Microsoft.CodeAnalysis.Workspaces.UnitTests.csproj b/src/Workspaces/CoreTest/Microsoft.CodeAnalysis.Workspaces.UnitTests.csproj
index ec118015c6694..f3669c0ea9931 100644
--- a/src/Workspaces/CoreTest/Microsoft.CodeAnalysis.Workspaces.UnitTests.csproj
+++ b/src/Workspaces/CoreTest/Microsoft.CodeAnalysis.Workspaces.UnitTests.csproj
@@ -3,7 +3,7 @@
Library
- net6.0-windows;net472
+ net7.0-windows;net472
Microsoft.CodeAnalysis.UnitTests
diff --git a/src/Workspaces/CoreTestUtilities/MEF/ExportProviderCache.cs b/src/Workspaces/CoreTestUtilities/MEF/ExportProviderCache.cs
index b32d0ef44e796..7b59fcbab923d 100644
--- a/src/Workspaces/CoreTestUtilities/MEF/ExportProviderCache.cs
+++ b/src/Workspaces/CoreTestUtilities/MEF/ExportProviderCache.cs
@@ -264,7 +264,9 @@ public Assembly LoadAssembly(string assemblyFullName, string codeBasePath)
var assemblyName = new AssemblyName(assemblyFullName);
if (!string.IsNullOrEmpty(codeBasePath))
{
+#pragma warning disable SYSLIB0044
assemblyName.CodeBase = codeBasePath;
+#pragma warning restore SYSLIB0044
}
return this.LoadAssembly(assemblyName);
diff --git a/src/Workspaces/CoreTestUtilities/Microsoft.CodeAnalysis.Workspaces.Test.Utilities.csproj b/src/Workspaces/CoreTestUtilities/Microsoft.CodeAnalysis.Workspaces.Test.Utilities.csproj
index c9d1803318502..662c9e4ac281e 100644
--- a/src/Workspaces/CoreTestUtilities/Microsoft.CodeAnalysis.Workspaces.Test.Utilities.csproj
+++ b/src/Workspaces/CoreTestUtilities/Microsoft.CodeAnalysis.Workspaces.Test.Utilities.csproj
@@ -4,7 +4,7 @@
Library
Microsoft.CodeAnalysis.UnitTests
- net6.0-windows;net472
+ net7.0-windows;net472
true
false
true
diff --git a/src/Workspaces/MSBuildTest/Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests.csproj b/src/Workspaces/MSBuildTest/Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests.csproj
index 92ae0254f2ba1..97c71e42d07d8 100644
--- a/src/Workspaces/MSBuildTest/Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests.csproj
+++ b/src/Workspaces/MSBuildTest/Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests.csproj
@@ -4,7 +4,7 @@
Library
Microsoft.CodeAnalysis.MSBuild.UnitTests
- net6.0-windows;net472
+ net7.0-windows;net472
diff --git a/src/Workspaces/Remote/ServiceHubTest/Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests.csproj b/src/Workspaces/Remote/ServiceHubTest/Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests.csproj
index af9d35f033920..da316f0f56d7b 100644
--- a/src/Workspaces/Remote/ServiceHubTest/Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests.csproj
+++ b/src/Workspaces/Remote/ServiceHubTest/Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests.csproj
@@ -3,7 +3,7 @@
Library
- net6.0-windows
+ net7.0-windows
Microsoft.CodeAnalysis.UnitTests
diff --git a/src/Workspaces/VisualBasicTest/Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests.vbproj b/src/Workspaces/VisualBasicTest/Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests.vbproj
index 782b9b97eefe1..605d29d8599ce 100644
--- a/src/Workspaces/VisualBasicTest/Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests.vbproj
+++ b/src/Workspaces/VisualBasicTest/Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests.vbproj
@@ -4,7 +4,7 @@
Library
Off
- net6.0-windows;net472
+ net7.0-windows;net472