Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7761337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:06:37+00:00 2026-06-01T14:06:37+00:00

I am creating a custom code generator using c#… this generator now only creates

  • 0

I am creating a custom code generator using c#… this generator now only creates the bussiness entity from tables of a database. But Now what I want is to create a project that contains this classes and after its creation…. Generate the dll from the project.

Is there a way to do this job?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:06:38+00:00Added an answer on June 1, 2026 at 2:06 pm

    You could use CSharpCodeProvider to compile code to a DLL, like this (found on the internet somewhere):

    public static bool CompileCSharpCode(String sourceFile, String outFile)
            { 
                // Obtain an ICodeCompiler from a CodeDomProvider class.
                CSharpCodeProvider provider = new CSharpCodeProvider(); 
                ICodeCompiler compiler = provider.CreateCompiler(); // Build the parameters for source compilation. 
                CompilerParameters cp = new CompilerParameters(); // Add an assembly reference. 
                cp.ReferencedAssemblies.Add("System.dll"); // Generate an class library instead of // a executable. 
                cp.GenerateExecutable = false; // Set the assembly file name to generate. 
                cp.OutputAssembly = outFile; // Save the assembly as a physical file. 
                cp.GenerateInMemory = false; // Invoke compilation. 
                CompilerResults cr = compiler.CompileAssemblyFromFile(cp, sourceFile);
                if (cr.Errors.Count > 0)
                { // Display compilation errors. 
                    Console.WriteLine("Errors building {0} into {1}", sourceFile, cr.PathToAssembly);
                    foreach (CompilerError ce in cr.Errors)
                    {
                        Console.WriteLine(" {0}", ce.ToString());
                        Console.WriteLine();
                    }
                }
                else
                {
                    Console.WriteLine("Source {0} built into {1} successfully.", sourceFile, cr.PathToAssembly);
                } // Return the results of compilation. 
                if (cr.Errors.Count > 0) { return false; } else { return true; }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing code generation, creating a custom attribute to decorate a class using CodeDOM,
I'm creating some custom components and backing code. I've created a Flex library project
I'm creating custom forum software for a site I'm building, which includes 2 tables
I'm creating custom table view cells, but result is incorrect. My code: - (UITableViewCell
I'm creating an installer using InnoSetup , and writing some custom handlers in a
In this tutorial he creates a custom login form, just to show how it
I am trying to code the process of creating Zend_Form objects using Doctrine2 ClassMetadatas
What I'm doing is creating a truth table generator. Using a function provided by
I am creating a custom lightbox which is basically a large image generated from
I'm often creating custom assertion methods for my JUnit tests. eg: public void assertArrays(String[]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.