Hey Michael,
On 4/20/09, Michael Foord <[email protected]> wrote:
> I guess a full IL writer would be needed - which means back to Cecil and
> the like and seeing if parts of them could be run on Silverlight. *sigh*
You just want to change the references to an assembly from the desktop
version to the SL version? With Cecil it's like:
var assembly = AssemblyFactory.GetAssembly (file);
foreach (var reference in assembly.MainModule.AssemblyReferences) {
if (!IsTargetAssembly (reference))
continue;
reference.Version = new Version (2, 0, 5, 0);
}
AssemblyFactory.SaveAssembly (assembly, file);
Now it doesn't guarantee that the resulting assembly is coherent,
visibility wise, as you may have used methods that are not visible or
not existent in SL.
--
Jb Evain <[email protected]>
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com