Actually, I was wrong. I was able to get both Mono and Roslyn in my project by importing NuGet packages for both Scriptcs.Mono and ScriptCs.Roslyn. :)
I have been digging around and found this older link on Roslyn: https://roslyn.codeplex.com/discussions/544763#PostContent_1251621 Which led me to this codebase: https://github.com/mattwarren/RoslynHeapAllocations It's based off of an older version of Roslyn, but I was able to find the corresponding calls to the latest release. It appears that I have to use AssemblyDefinition.ReadAssembly( Stream ) to get what I after. I was curious if there is another way of doing this that you were thinking of... otherwise, I think I'm set. This will be awesome. Good riddance T4. :) :) :) Thank you all! On Friday, November 28, 2014 4:49:55 AM UTC-5, Michael DeMond wrote: > > OK... It does appear that Roslyn is currently only available in VS2015, > which is not what I am developing on (yet). I have been looking into > scriptcs, and have not found any obvious method in which IL can be > generated... so if you know of a resource you can point me to, that would > be greatly appreciated! > > Thanks again, > Michael > > On Thursday, November 27, 2014 4:03:05 PM UTC-5, Michael DeMond wrote: >> >> Oh my. :) I will definitely check that out! Thank you, Greg! >> >> On Thursday, November 27, 2014 11:16:04 AM UTC-5, Greg Young wrote: >>> >>> It creates IL you can then read that IL with cecil :) >>> >>> On Thu, Nov 27, 2014 at 4:13 PM, Michael DeMond <[email protected]> >>> wrote: >>> > I could... but I would still have to convert it back to Cecil >>> constructs, >>> > correct? Seems like a lot of work... might as well just learn IL. :P >>> > >>> > On Thursday, November 27, 2014 10:46:30 AM UTC-5, Greg Young wrote: >>> >> >>> >> Have you looked at scriptcs or roslyn? I don't remember if roslyn is >>> >> pcl compatible >>> >> >>> >> On Thu, Nov 27, 2014 at 1:45 PM, Michael DeMond <[email protected]> >>> >>> >> wrote: >>> >> > I'm trying to get away with not learning IL... that's what. ;) >>> >> > >>> >> > And yes, I realize that T4 doesn't have much in common w/ Cecil, >>> but I >>> >> > find >>> >> > it very difficult to work with. >>> >> > >>> >> > I'm basically building a Xamarin.Forms framework, and >>> unfortunately, iOS >>> >> > does not support dynamic code, so all code must be compiled >>> >> > ahead-of-time. >>> >> > My framework involves Unity Interception and Policy Injection and I >>> want >>> >> > to >>> >> > port that over to Xamarin.Forms (PCLs), so that will involve using >>> Cecil >>> >> > to >>> >> > rewrite assemblies after they are compiled. I'm looking at both >>> Fody >>> >> > and >>> >> > FluentIL to do this. FluentIL does have a parsing mechanism, but it >>> is >>> >> > not >>> >> > robust (still very impressive though!). >>> >> > >>> >> > Thanks for replying... on Thanksgiving no less. Enjoy the turkey. >>> :D >>> >> > >>> >> > On Thursday, November 27, 2014 8:38:16 AM UTC-5, Jb Evain wrote: >>> >> >> >>> >> >> Hi Michael, >>> >> >> >>> >> >> Thanks for the kind words! >>> >> >> >>> >> >> I don't think there's anything like that around. It would involve >>> a C# >>> >> >> REPL like compiler (Mono has one, Roslyn has one) that doesn't >>> emit >>> >> >> assemblies in memory, and analyzing the result. >>> >> >> >>> >> >> The real question is why would you want that? Cecil and T4 don't >>> have >>> >> >> much in common : what are you trying to achieve? >>> >> >> >>> >> >> Jb >>> >> >> >>> >> >> On Thu, Nov 27, 2014 at 2:22 PM, Michael DeMond < >>> [email protected]> >>> >> >> wrote: >>> >> >> > Hello Community, >>> >> >> > >>> >> >> > I am looking into Cecil... tremendous project, I must say first >>> off. >>> >> >> > I >>> >> >> > am >>> >> >> > curious if there is a way to take a given string and parse it >>> into an >>> >> >> > Cecil >>> >> >> > entity definition. For instance, something like: >>> >> >> > >>> >> >> > var data = "void Add( int a, int b ) { return a + b; }"; >>> >> >> > MethodDefinition definition = >>> SomeAwesomeExpressionParserClass.Parse( >>> >> >> > data >>> >> >> > ); >>> >> >> > >>> >> >> > This would be extremely useful and would possibly eliminate any >>> sort >>> >> >> > of >>> >> >> > dependency on T4 (I have found this very clunky and Cecil seems >>> like >>> >> >> > a >>> >> >> > MUCH >>> >> >> > better alternative!) >>> >> >> > >>> >> >> > Thanks for any assistance you can provide, >>> >> >> > Michael >>> >> >> > >>> >> >> > -- >>> >> >> > -- >>> >> >> > -- >>> >> >> > mono-cecil >>> >> >> > --- >>> >> >> > You received this message because you are subscribed to the >>> Google >>> >> >> > Groups >>> >> >> > "mono-cecil" group. >>> >> >> > To unsubscribe from this group and stop receiving emails from >>> it, >>> >> >> > send >>> >> >> > an >>> >> >> > email to [email protected]. >>> >> >> > For more options, visit https://groups.google.com/d/optout. >>> >> > >>> >> > -- >>> >> > -- >>> >> > -- >>> >> > mono-cecil >>> >> > --- >>> >> > You received this message because you are subscribed to the Google >>> >> > Groups >>> >> > "mono-cecil" group. >>> >> > To unsubscribe from this group and stop receiving emails from it, >>> send >>> >> > an >>> >> > email to [email protected]. >>> >> > For more options, visit https://groups.google.com/d/optout. >>> >> >>> >> >>> >> >>> >> -- >>> >> Studying for the Turing test >>> > >>> > -- >>> > -- >>> > -- >>> > mono-cecil >>> > --- >>> > You received this message because you are subscribed to the Google >>> Groups >>> > "mono-cecil" group. >>> > To unsubscribe from this group and stop receiving emails from it, send >>> an >>> > email to [email protected]. >>> > For more options, visit https://groups.google.com/d/optout. >>> >>> >>> >>> -- >>> Studying for the Turing test >>> >> -- -- -- mono-cecil --- You received this message because you are subscribed to the Google Groups "mono-cecil" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
