// (6,14): error CS7038: Failed to emit module 'Unable to read debug information of method 'C.F()' (token 0x06000001) from assembly 'PdbReadingErrorsAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null''.
Diagnostic(ErrorCode.ERR_ModuleEmitFailure,"F").WithArguments("Unable to read debug information of method 'C.F()' (token 0x06000001) from assembly 'PdbReadingErrorsAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'").WithLocation(6,14));
// TODO: localize message & use better error code (https://github.com/dotnet/roslyn/issues/11512):
diagnostics.Add(MessageProvider.CreateDiagnostic(
MessageProvider.ERR_ModuleEmitFailure,
method.Locations.First(),
$"Unable to read debug information of method '{MessageProvider.GetErrorDisplayString(method)}' (token 0x{MetadataTokens.GetToken(previousHandle):X8}) "+
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem.Collections.Immutable;
usingSystem.IO;
usingSystem.Reflection.Metadata;
usingMicrosoft.CodeAnalysis;
...
...
@@ -16,7 +17,7 @@ public static EditAndContinueMethodDebugInformation GetEncMethodDebugInfo(this I