diff --git a/src/Compilers/CSharp/Portable/CSharpResources.Designer.cs b/src/Compilers/CSharp/Portable/CSharpResources.Designer.cs index cf903f9ee470485cb5896c5477affc50ea7d8e15..845235d269ce04a28a5bbb9f59ea0e4ae61b710c 100644 --- a/src/Compilers/CSharp/Portable/CSharpResources.Designer.cs +++ b/src/Compilers/CSharp/Portable/CSharpResources.Designer.cs @@ -11106,7 +11106,7 @@ internal class CSharpResources { } /// - /// Looks up a localized string similar to Provided Source Code Kind is unsupported or invalid: '{0}'.. + /// Looks up a localized string similar to Provided Source Code Kind is unsupported or invalid: '{0}'. /// internal static string WRN_BadSourceCodeKind { get { @@ -11114,6 +11114,15 @@ internal class CSharpResources { } } + /// + /// Looks up a localized string similar to Provided Source Code Kind is unsupported or invalid. + /// + internal static string WRN_BadSourceCodeKind_Title { + get { + return ResourceManager.GetString("WRN_BadSourceCodeKind_Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to The language name '{0}' is invalid.. /// @@ -12140,6 +12149,15 @@ internal class CSharpResources { } } + /// + /// Looks up a localized string similar to Invalid value for a preprocessing symbol; not a valid identifier. + /// + internal static string WRN_DefineIdentifierRequired_Title { + get { + return ResourceManager.GetString("WRN_DefineIdentifierRequired_Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to Delay signing was specified and requires a public key, but no public key was specified. /// diff --git a/src/Compilers/CSharp/Portable/CSharpResources.resx b/src/Compilers/CSharp/Portable/CSharpResources.resx index 8866f7512cb549e8143db433376cf63daf0c5d94..500d505158a736149e12637506a42d0e844cca93 100644 --- a/src/Compilers/CSharp/Portable/CSharpResources.resx +++ b/src/Compilers/CSharp/Portable/CSharpResources.resx @@ -5021,9 +5021,15 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ Provided Documentation Mode is unsupported or invalid: '{0}'. - Provided Source Code Kind is unsupported or invalid: '{0}'. + Provided Source Code Kind is unsupported or invalid: '{0}' Provided Language Version is unsupported or invalid: '{0}'. + + Provided Source Code Kind is unsupported or invalid + + + Invalid value for a preprocessing symbol; not a valid identifier + \ No newline at end of file diff --git a/src/Compilers/CSharp/Test/Semantic/Diagnostics/GetDiagnosticsTests.cs b/src/Compilers/CSharp/Test/Semantic/Diagnostics/GetDiagnosticsTests.cs index 00828484b974bb8cc3a0899d8dde917dffc36d10..2151030d0e61c2d1c67d88d93c17d0b4e64a90b0 100644 --- a/src/Compilers/CSharp/Test/Semantic/Diagnostics/GetDiagnosticsTests.cs +++ b/src/Compilers/CSharp/Test/Semantic/Diagnostics/GetDiagnosticsTests.cs @@ -318,7 +318,7 @@ public void CompilingCodeWithInvalidSourceCodeKindShouldProvideDiagnostics() #pragma warning restore CS0618 // Type or member is obsolete compilation.VerifyDiagnostics( - // warning CS8190: Provided Source Code Kind is unsupported or invalid: 'Interactive'. + // warning CS8190: Provided Source Code Kind is unsupported or invalid: 'Interactive' Diagnostic(ErrorCode.WRN_BadSourceCodeKind).WithArguments("Interactive").WithLocation(1, 1)); } diff --git a/src/Compilers/Core/Portable/SourceCodeKind.cs b/src/Compilers/Core/Portable/SourceCodeKind.cs index 948623c93d50fd6901aeb534d4758a73eaf60cf5..b4ee0d822d851c1fd83092063a6599d090d5c69a 100644 --- a/src/Compilers/Core/Portable/SourceCodeKind.cs +++ b/src/Compilers/Core/Portable/SourceCodeKind.cs @@ -39,11 +39,11 @@ internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind k case SourceCodeKind.Regular: return SourceCodeKind.Regular; -#pragma warning disable CS0618 // SourceCodeKind.Interactive is obsolete case SourceCodeKind.Script: +#pragma warning disable CS0618 // SourceCodeKind.Interactive is obsolete case SourceCodeKind.Interactive: - return SourceCodeKind.Script; #pragma warning restore CS0618 // SourceCodeKind.Interactive is obsolete + return SourceCodeKind.Script; default: throw new NotSupportedException($"SourceCodeKind {kind} not supported"); diff --git a/src/Compilers/VisualBasic/Portable/VBResources.Designer.vb b/src/Compilers/VisualBasic/Portable/VBResources.Designer.vb index 5d347562eacff608ce372a5caa9c75cacc2760c4..6bcbc671ee8f2bb44b0b9edeb0a285f3a3f567f4 100644 --- a/src/Compilers/VisualBasic/Portable/VBResources.Designer.vb +++ b/src/Compilers/VisualBasic/Portable/VBResources.Designer.vb @@ -12784,7 +12784,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic End Property ''' - ''' Looks up a localized string similar to Provided Source Code Kind is unsupported or invalid: '{0}'.. + ''' Looks up a localized string similar to Provided Source Code Kind is unsupported or invalid: '{0}'. ''' Friend ReadOnly Property WRN_BadSourceCodeKind() As String Get @@ -12792,6 +12792,15 @@ Namespace Microsoft.CodeAnalysis.VisualBasic End Get End Property + ''' + ''' Looks up a localized string similar to Provided Source Code Kind is unsupported or invalid. + ''' + Friend ReadOnly Property WRN_BadSourceCodeKind_Title() As String + Get + Return ResourceManager.GetString("WRN_BadSourceCodeKind_Title", resourceCulture) + End Get + End Property + ''' ''' Looks up a localized string similar to unrecognized option '{0}'; ignored. ''' diff --git a/src/Compilers/VisualBasic/Portable/VBResources.resx b/src/Compilers/VisualBasic/Portable/VBResources.resx index e96cca34bdabac1ef7b1e192152365fb0c9eb5d2..ff79f8865819bfd79cd44bd343a9845dfc2dab0c 100644 --- a/src/Compilers/VisualBasic/Portable/VBResources.resx +++ b/src/Compilers/VisualBasic/Portable/VBResources.resx @@ -5474,6 +5474,9 @@ Provided Language Version is unsupported or invalid: '{0}'. - Provided Source Code Kind is unsupported or invalid: '{0}'. + Provided Source Code Kind is unsupported or invalid: '{0}' + + + Provided Source Code Kind is unsupported or invalid \ No newline at end of file diff --git a/src/Compilers/VisualBasic/Test/Semantic/Diagnostics/GetDiagnosticsTests.vb b/src/Compilers/VisualBasic/Test/Semantic/Diagnostics/GetDiagnosticsTests.vb index 701334d1d352ac1d7169d32b9238dffa02db043d..49741b45c48dd8cefe62bc8521cfec67484a7094 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/Diagnostics/GetDiagnosticsTests.vb +++ b/src/Compilers/VisualBasic/Test/Semantic/Diagnostics/GetDiagnosticsTests.vb @@ -242,7 +242,7 @@ BC31030: Project-level conditional compilation constant '1' is not valid: Identi #Enable Warning BC40000 ' Type or member is obsolete CompilationUtils.AssertTheseDiagnostics(compilation, -BC37284: Provided Source Code Kind is unsupported or invalid: 'Interactive'. +BC37284: Provided Source Code Kind is unsupported or invalid: 'Interactive' ) End Sub