codedom Questions

1

Solved

Using the C# code provider and the ICodeCompiler.CompileAssemblyFromSource method, I am attempting to compile a code file in order to produce an executable assembly. The code that I would like to...
Rapt asked 16/11, 2013 at 13:24

2

Solved

I am looking into the System.CodeDom namespace for language-independent (at least within certain bounds) source code generation, and I have found some information discouraging the use of CodeDom. ...
Diffusivity asked 10/2, 2013 at 11:2

3

Solved

How to build CodeCompileUnit from source code? What is the best way to parse a C# source code(s)? Is CodeCompileUnit a correct selection? and howto? Thanks
Sternpost asked 19/7, 2011 at 22:11

4

Solved

I am working on a project that will use CodeDOM to create a class that evaluates a user-defined expression, creates an assembly for the class, and loads the assembly. Since there can be a fair numb...
Zeus asked 18/8, 2010 at 14:7

2

Solved

Following up on this excellent answer, I'm wondering if the DLR using the dynamic keyword can allow a less verbose way of writing code for the generated assembly. For example, can the aforemention...
Adamant asked 6/6, 2012 at 12:45

2

Solved

Is there a way to generate a class constraint with CodeDom. Because when I use something like var method = new CodeMemberMethod(); var genericParam = new CodeTypeParameter("InterfaceType"); gener...
Billybillycock asked 4/1, 2009 at 14:29

1

Solved

I'm actually doing this with helper executables that are 32bit. But can I do it with DLLs that run on 32bit CodeDOM?
Homemaker asked 18/12, 2011 at 13:22

2

Solved

So I have a CodeDOM compiler written in C# that's supposed to compile another application based on one of its resources. How would I change the target .NET framework of the resource (or of the outp...
Hearth asked 28/8, 2011 at 16:51

1

Solved

i am trying to compile some code to memory at runtime using a CodeDomProvider. The code I am compiling have a reference to an external assembly which I include in the parameters used when compilin...
Voltaism asked 24/7, 2011 at 0:15

2

Solved

Has anyone ever tried to generate extension methods using System.CodeDom under .NET 4.0? There doesn't seem to be any way to specify a CodeMemberMethod or CodeParameterDeclarationExpression as bein...
Gobang asked 15/5, 2011 at 21:10

5

Solved

I've got a situation where I need to generate a class with a large string const. Code outside of my control causes my generated CodeDom tree to be emitted to C# source and then later compiled as pa...
Dittmer asked 6/6, 2009 at 19:1

2

Can you explain very briefly what CodeDOM is and used for with a simple real life example? A simple example that covers why would I need it as a developer, in what scenarios? Thanks
Protuberant asked 15/4, 2011 at 7:25

2

Solved

I'm working on a C# application that allows users to basically import tables of data, and then enter their own formulas in a mini-language to compute new columns from the underlying data. These fo...
Catamite asked 30/3, 2011 at 20:18

3

Solved

I have a need to compile some code using CodeDomProvider.CompileAssemblyFromSource. How would one go about debugging it? Basically, I want to compile it, create instance of a type and then step int...
Schlimazel asked 8/4, 2011 at 13:35

2

Solved

The msdn documentation says add namespaces imports to the CodeNamespace.Imports collection. This puts them inside the namespace (which makes sense, since your adding them to the namespace) namespa...
Capua asked 4/5, 2010 at 13:43

5

Solved

I have a C# app I'm working on that loads it's code remotely, and then runs it (for the sake of argument, you can assume the app is secure). The code is C#, but it is sent as an XML document, pars...
Drescher asked 14/2, 2011 at 23:39

4

Solved

I've a same project that need to be compiled with .NET and Compact .NET Framework. It is possible to create a C# compiler that will compile my project with both framework ? Some feature aren't pr...
Germano asked 24/2, 2011 at 18:45

1

Can CodeDom create optional arguments when generating a c# method and provide a default value? For example: public void ExampleMethod(int required , string optionalstr = "default string" , int ...
Enravish asked 19/1, 2011 at 21:4

1

Solved

Can Silverlight apps (the .xap file, the testpage.html, content resources along side a ClientBin, out of browser settings, etc) be created using only System.CodeDom from a regular .NET app? Meaning...
Woe asked 18/10, 2010 at 23:49

2

Solved

What are the differences between Expression trees and CodeDom? Which should I use for which scenario?
Saltine asked 17/7, 2010 at 11:38

3

Solved

I have the body of a method stored as a string and I'm looking to create this method dynamically. However, I'm unsure how to assign its body. I've come across a rather complex method using CodeDom,...
Decongestant asked 7/6, 2010 at 5:13

2

The question in short: How can I debug the code generated during a debugging session on the generating program? (see code below) I am facing the following issue: I would like to debug into dynamic...
Kandace asked 20/10, 2009 at 11:22

1

Solved

I want to create an Enumeration using CodeDom API. I have searched enough on the internet and I get results which are hardly of any use. What I want to generate is public enum bug_tracker_type { ...
Hufuf asked 17/4, 2010 at 7:10

5

Solved

Does anyone knows a tool for Java (something like codedom for C#) that provides a way to generate Java code to a .java file? EDIT: I'm building a platform the main objective of which is to automate...
Chiropractor asked 12/4, 2010 at 16:44

2

Solved

Considering this question of SO, where whole C# in-memory compiler is being called. When only lexical and syntactic analyzing is required: parse text as a stream of lexemes, check them and exit. I...
Elaboration asked 9/4, 2010 at 20:59

© 2022 - 2024 — McMap. All rights reserved.