Look at your mapping file, and find the method that was obfuscated
into "A.f.A (A.E A, A.A a)". Look over the source code for the
method...it may using a type whose assembly is used for the first time
at that point in your code, and failing to find that type within it.
Unless you're doing something fancy with reflection, it's probably
because either the assembly containing the missing type isn't the same
one obfuscated with the calling code, or because of a bug in the
obfuscation tool.
Is it possible you're mixing obfuscated and non-obfuscated assemblies?
If you have two assemblies, say MainAssembly and DependencyAssembly,
where MainAssembly is dependent on classes in DependencyAssembly, and
you include both of them in your config file, both will be obfuscated.
If at runtime, you have an obfuscated MainAssembly trying to load
types from a non-obfuscated DependencyAssembly, you could see this
issue.
From your earlier error message, it sounds like it's not failing to
find the assembly, just failing to find and load a type within
it...can you find them when looking with reflector?
Would it be possible to put together a minimal example that reproduces
the problem? Possibly extracting these classes or methods into
separate assemblies, changing the names, and removing proprietary
code? Without seeing some failing code or assemblies, I'm not sure
that I can help much.
I was able to reproduce the problem you had, and made some progress
towards debugging it.
First, I made sure that the problem wasn't Mono.Cecil, by forcing
obfuscar to load and save the assemblies with no obfuscation...problem
went away, meaning Cecil isn't broken (I didn't expect it to be, but
it's an easy test).
I removed assemblies, one at a time from the obfuscar config, making
sure the problem occurred...narrowing it down until the problem could
be reproduced by obfuscating a single assembly.
Then, I turned off obfuscation of all types (<SkipType name="*" />),
and the problem still happened...so it's not the type renaming. I
turned off method renaming (<SkipMethod type="*" rx=".*" />)...problem
went away, meaning it's a problem with method renaming.
To narrow down which type(s) were causing problems, I skipped methods
in sets of types to see when the problem would or wouldn't occur.
Skipping methods in types whose names were A through P (<SkipMethod
type="^SomeNameSpace\.[A-P].*" rx=".*" />, namespace changed to
protect the innocent) still showed the problem, but skipping methods
in types whose names were A through R (<SkipMethod
type="^SomeNameSpace\.[A-R].*" rx=".*" />) did not. Skipping just the
methods in types beginning with R (<SkipMethod
type="^SomeNameSpace\.R.*" rx=".*" />) still had the problem, meaning
that the problem involves renaming methods in types beginning with R,
and renaming methods in types beginning with another letter.
Slicing the set of renamed methods, I narrowed it down to being able
to fix the problem by skipping the methods in two classes, then
narrowed it further to being able to fix the problem by skipping a
specific method in each class.
i.e., narrowed it down so that the problem goes away by adding
something like the following:
<SkipMethod type="SomeNameSpace.AwesomeClass" rx="set_SomeProperty" />
<SkipMethod type="SomeNameSpace.RegularClass" rx="set_SomeProperty" />
It looks like there's a problem where the the property setters of the
two properties should be obfuscated to the same name, but because
obfuscar can't tell they're related, they get different names and no
longer match up. I can't immediately tell how they're related (from
reflector, it doesn't look like a base/descendant relation), and I'd
rather not spend time reverse engineering / debugging the assemblies
to work it out. It should be possible with your knowledge of the
source to work it out and make a test case for fixing obfuscar, but in
the mean time, skipping the two methods fixes it.