NotSupportedException Thrown With Silverlight 5 Assemblies #103
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
To replicate, run the following code using an assembly from the Silverlight 5 SDK:
A NotSupportedException is thrown from Mono.Cecil\BaseAssemblyResolver.cs(245): "Version not supported: 5.0.5.0"
Replicated with local build using Master with commit
34f3fcbfac.Mono.Cecil should support reading Silverlight 5.0 assemblies.
As a matter of fact, it supports reading them just fine.
The only thing is that for resolving assemblies, it doesn't know what 5.0.5.0 means, as Silverlight assemblies are no different from desktop assemblies.
Thus, for silverlight assemblies, you must use a custom assembly resolver which knows how to resolver SL assemblies.
For instance, you can write:
To make your sample to work.
OK fair enough. I'm already using a custom resolver, so I'll add the v5 path to the directory list.
I just assumed you'd want to include the path in the default resolver.
Would the example really work with those three lines? Don't you have to program a parser?