diff --git a/eng/build.ps1 b/eng/build.ps1
index e85b12d5793a8726995cb8c5a6162fce1842397f..67784c7adfe97c2949a37b9b79e77629d1aea46e 100644
--- a/eng/build.ps1
+++ b/eng/build.ps1
@@ -428,6 +428,11 @@ function TestUsingOptimizedRunner() {
if ($testIOperation) {
Remove-Item env:\ROSLYN_TEST_IOPERATION
}
+
+ if ($testVsi) {
+ Write-Host "Copying ServiceHub logs to $LogDir"
+ Copy-Item -Path (Join-Path $TempDir "servicehub\logs") -Destination (Join-Path $LogDir "servicehub") -Recurse
+ }
}
}
@@ -622,7 +627,9 @@ try {
}
catch
{
- echo "##vso[task.logissue type=error](NETCORE_ENGINEERING_TELEMETRY=Build) Build failed"
+ if ($ci) {
+ echo "##vso[task.logissue type=error](NETCORE_ENGINEERING_TELEMETRY=Build) Build failed"
+ }
throw $_
}
@@ -642,7 +649,9 @@ try {
}
catch
{
- echo "##vso[task.logissue type=error](NETCORE_ENGINEERING_TELEMETRY=Test) Tests failed"
+ if ($ci) {
+ echo "##vso[task.logissue type=error](NETCORE_ENGINEERING_TELEMETRY=Test) Tests failed"
+ }
throw $_
}
diff --git a/src/Compilers/Core/Portable/Compilation/CompilationOptions.cs b/src/Compilers/Core/Portable/Compilation/CompilationOptions.cs
index 2a3612d7f14e5da5b4d6cda93cfa94fffac20d87..21f4cc3d747ed2c6a5fc2029eaba71cd14b2452b 100644
--- a/src/Compilers/Core/Portable/Compilation/CompilationOptions.cs
+++ b/src/Compilers/Core/Portable/Compilation/CompilationOptions.cs
@@ -386,7 +386,7 @@ public CompilationOptions WithGeneralDiagnosticOption(ReportDiagnostic value)
///
/// Creates a new options instance with the specified diagnostic-specific options.
///
- public CompilationOptions WithSpecificDiagnosticOptions(ImmutableDictionary value)
+ public CompilationOptions WithSpecificDiagnosticOptions(ImmutableDictionary? value)
{
return CommonWithSpecificDiagnosticOptions(value);
}
@@ -497,7 +497,7 @@ public CompilationOptions WithCryptoKeyContainer(string? cryptoKeyContainer)
return CommonWithCryptoKeyContainer(cryptoKeyContainer);
}
- public CompilationOptions WithCryptoKeyFile(string cryptoKeyFile)
+ public CompilationOptions WithCryptoKeyFile(string? cryptoKeyFile)
{
return CommonWithCryptoKeyFile(cryptoKeyFile);
}
@@ -531,14 +531,14 @@ public CompilationOptions WithOverflowChecks(bool checkOverflow)
protected abstract CompilationOptions CommonWithAssemblyIdentityComparer(AssemblyIdentityComparer comparer);
protected abstract CompilationOptions CommonWithStrongNameProvider(StrongNameProvider? provider);
protected abstract CompilationOptions CommonWithGeneralDiagnosticOption(ReportDiagnostic generalDiagnosticOption);
- protected abstract CompilationOptions CommonWithSpecificDiagnosticOptions(ImmutableDictionary specificDiagnosticOptions);
+ protected abstract CompilationOptions CommonWithSpecificDiagnosticOptions(ImmutableDictionary? specificDiagnosticOptions);
protected abstract CompilationOptions CommonWithSpecificDiagnosticOptions(IEnumerable> specificDiagnosticOptions);
protected abstract CompilationOptions CommonWithReportSuppressedDiagnostics(bool reportSuppressedDiagnostics);
protected abstract CompilationOptions CommonWithModuleName(string? moduleName);
protected abstract CompilationOptions CommonWithMainTypeName(string? mainTypeName);
protected abstract CompilationOptions CommonWithScriptClassName(string scriptClassName);
protected abstract CompilationOptions CommonWithCryptoKeyContainer(string? cryptoKeyContainer);
- protected abstract CompilationOptions CommonWithCryptoKeyFile(string cryptoKeyFile);
+ protected abstract CompilationOptions CommonWithCryptoKeyFile(string? cryptoKeyFile);
protected abstract CompilationOptions CommonWithCryptoPublicKey(ImmutableArray cryptoPublicKey);
protected abstract CompilationOptions CommonWithDelaySign(bool? delaySign);
protected abstract CompilationOptions CommonWithCheckOverflow(bool checkOverflow);
diff --git a/src/EditorFeatures/CSharpTest/Completion/CompletionProviders/ExtensionMethodImportCompletionProviderTests.cs b/src/EditorFeatures/CSharpTest/Completion/CompletionProviders/ExtensionMethodImportCompletionProviderTests.cs
index c84b5c62e4351ab9d750b8b128d46fa0cb5f7522..b6ddad85941264b1dd7f9c95a2963ed4ca5c5df2 100644
--- a/src/EditorFeatures/CSharpTest/Completion/CompletionProviders/ExtensionMethodImportCompletionProviderTests.cs
+++ b/src/EditorFeatures/CSharpTest/Completion/CompletionProviders/ExtensionMethodImportCompletionProviderTests.cs
@@ -20,6 +20,10 @@ namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Completion.CompletionPr
[UseExportProvider]
public class ExtensionMethodImportCompletionProviderTests : AbstractCSharpCompletionProviderTests
{
+ private static readonly IExportProviderFactory s_exportProviderFactory
+ = ExportProviderCache.GetOrCreateExportProviderFactory(
+ TestExportProvider.EntireAssemblyCatalogWithCSharpAndVisualBasic.WithPart(typeof(TestExperimentationService)));
+
public ExtensionMethodImportCompletionProviderTests(CSharpTestWorkspaceFixture workspaceFixture) : base(workspaceFixture)
{
}
@@ -36,11 +40,7 @@ protected override OptionSet WithChangedOptions(OptionSet options)
}
protected override ExportProvider GetExportProvider()
- {
- return ExportProviderCache
- .GetOrCreateExportProviderFactory(TestExportProvider.EntireAssemblyCatalogWithCSharpAndVisualBasic.WithPart(typeof(TestExperimentationService)))
- .CreateExportProvider();
- }
+ => s_exportProviderFactory.CreateExportProvider();
internal override CompletionProvider CreateCompletionProvider()
{
@@ -76,34 +76,16 @@ private static IEnumerable> BuiltInTypes
{
get
{
- var predefinedTypes = new List>
- {
- new List()
- { "int", "Int32", "System.Int32" },
- new List()
- { "float", "Single", "System.Single" },
- new List()
- { "uint", "UInt32", "System.UInt32" },
- new List()
- { "bool", "Boolean", "System.Boolean"},
- new List()
- { "string", "String", "System.String"},
- new List()
- { "object", "Object", "System.Object"},
- };
-
+ var predefinedTypes = new List() { "string", "String", "System.String" };
var arraySuffixes = new[] { "", "[]", "[,]" };
- foreach (var group in predefinedTypes)
+ foreach (var type1 in predefinedTypes)
{
- foreach (var type1 in group)
+ foreach (var type2 in predefinedTypes)
{
- foreach (var type2 in group)
+ foreach (var suffix in arraySuffixes)
{
- foreach (var suffix in arraySuffixes)
- {
- yield return new List