[Source] SourceRunner - CodeDOM Invocation Example |
|
06-25-2012, 03:00 AM
(This post was last modified: 06-25-2012 03:07 AM by AceInfinity.)
|
|||
|
|||
SourceRunner - CodeDOM Invocation Example
![]() Features:
• Change .NET Framework version • Change reference assemblies Just a quick example i've put together as we haven't had much around here on CodeDOM at all... With this setup, and I haven't tested yet even though I should have, unsafe code context should work as well. :) Code: (SELECT ALL CODE) using System;For the text files which have to be in the same working directory as the app at runtime: CompileCode.txt: Code: (SELECT ALL CODE) using System;ReferenceAssemblies.txt: *I just added a whole bunch of crap here after I added in the main ones. Code: (SELECT ALL CODE) //This is a list of Referenced AssembliesDownload: To the one I compiled if you can't compile your own here. *See Attachment* ![]() Microsoft MVP .NET Programming - (2012 - Present) ®Crestron DMC-T Certified Automation Programmer Development Site: aceinfinity.net |
|||
|
06-25-2012, 03:11 AM
|
|||
|
|||
RE: SourceRunner - CodeDOM Invocation Example
![]() Microsoft MVP .NET Programming - (2012 - Present) ®Crestron DMC-T Certified Automation Programmer Development Site: aceinfinity.net |
|||
|
06-25-2012, 07:54 AM
|
|||
|
|||
|
RE: SourceRunner - CodeDOM Invocation Example
Wow nice! this tool could be handy for testing snippets :)
|
|||
|
06-25-2012, 09:11 AM
|
|||
|
|||
|
RE: SourceRunner - CodeDOM Invocation Example
As you said, we don't get much CodeDOM around here. Nice work Ace!
|
|||
|
06-25-2012, 09:54 PM
|
|||
|
|||
RE: SourceRunner - CodeDOM Invocation Example
(06-25-2012 07:54 AM)#KerplunK Wrote: Wow nice! this tool could be handy for testing snippets :) Exactly, if you don't feel like opening VS? It'll do for small functions, depending on what they do. (06-25-2012 09:11 AM)KoBE Wrote: As you said, we don't get much CodeDOM around here. Nice work Ace! I haven't seen stuff like this, this was a test I figured out all on my own. In this source i've set the /optimize flag and /unsafe flag, if you don't want unsafe code to be allowed, then remove that, or /optimize. You can change .NET framework versions. By default it assumes 2.0 I believe, which is useless. I wasn't able to use LINQ until I added it to compile using v3.5 or higher.
![]() Microsoft MVP .NET Programming - (2012 - Present) ®Crestron DMC-T Certified Automation Programmer Development Site: aceinfinity.net |
|||
| Users browsing this thread |
| 1 Guest(s) |

SourceRunner - CodeDOM Invocation Example





