-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"AnnotatorBuildTask" task failed unexpectedly with Mono.Cecil.AssemblyResolutionException #37
Comments
@jbevain Is there a way we can get Cecil to treat this as an opaque/unresolved error type that is simply preserved when we write the modified assembly back to disk? |
@jnm2 Worst case, we can make it report a warning like it does for other skipped assemblies. The build author can control whether the warning is treated as a build error. |
@sharwell I think this happens because you use the Immediate mode that creates the entire DOM, including custom attributes. If you use the delayed one, it might be able to optimize the reading/writing of the custom attributes straight to bytes. What happens here is that Cecil reads a custom attribute with an enum, and there's no way to know the size of the enum unless you resolve its type definition. |
Interestingly, there are a ton of "Failed to resolve assembly" messages when building an empty
802 failures total: net451 build log.txt |
That's produced by this code: ReferenceAssemblyAnnotator/TunnelVisionLabs.ReferenceAssemblyAnnotator/Program.cs Lines 238 to 246 in 2563160
Once ReadingMode.Deferred is used it will be interesting to see if/where we need to add another catch block. |
This is alpha 77 on Shouldly's Ubuntu build:
I'm not sure whether this is recoverable or whether it should just be turned into a nicer error.
Stack trace:
The text was updated successfully, but these errors were encountered: