Skip to content

Commit 1032c0e

Browse files
authored
[Java.Interop.Tools.Cecil] Change DirectoryAssemblyResolver Warning to Diagnostic Output (#622)
Context: dotnet/android#2120 When building an app and using an Obfuscator you wind up with a lot of warnings such as: warning : Failed to read 'obj\Release\90\android\assets\DotfuscatorForms.Android.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. warning : Mono.Cecil.Cil.SymbolsNotMatchingException: Symbols were found but are not matching the assembly These are probably the result of the Obfuscation process since the assembly changed. However the warning was *not* useful or -- more importantly -- actionable by the user. It is just noise. It might be useful for the developers writing the Java.Interop tooling itself. Rather than a warning, change the message to be `Verbose`. This will allow it up show up in full diagnostic output, but NOT in a normal build. It won't be a warning so users will not feel a need to fix it.
1 parent 93df5a2 commit 1032c0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ protected virtual AssemblyDefinition ReadAssembly (string file)
163163
return AssemblyDefinition.ReadAssembly (file, reader_parameters);
164164
} catch (Exception ex) {
165165
logger (
166-
TraceLevel.Warning,
166+
TraceLevel.Verbose,
167167
$"Failed to read '{file}' with debugging symbols. Retrying to load it without it. Error details are logged below.");
168-
logger (TraceLevel.Warning, $"{ex.ToString ()}");
168+
logger (TraceLevel.Verbose, $"{ex.ToString ()}");
169169
reader_parameters.ReadSymbols = false;
170170
return AssemblyDefinition.ReadAssembly (file, reader_parameters);
171171
}

0 commit comments

Comments
 (0)