Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Generate a New Visual Studio Project in a Visual Studio Project Programmatically?
    text
    copied!<p>I coded a project that takes your database tables - which you choose and build C# classes related to tables' columns. Like, filter, query etc. </p> <p>It totally works, I can generate 6 different classes with full functionality - depends on my needs - for a table with one click. T4 really rocks!</p> <p>But, I want to create a new project for these classes. As you understood, it was not my ultimate aim to just create these files.</p> <p>Now, I am trying to generate a new project/solution for these classes programmatically. </p> <p>I read different questions related to this issue, but that wasn't enough for me. For example, <a href="https://stackoverflow.com/questions/8790528/create-a-visual-studio-project-programmatically">Create a Visual Studio project programmatically</a> is close to my issue, but it didn't satisfy me. I couldn't find how to choose the type of new project.</p> <p>I looked at <a href="https://stackoverflow.com/questions/2736260/programmatically-generate-visual-studio-solution">Programmatically generate Visual Studio Solution</a> but I couldn't find a way to give new solution to my generated classes. Also I looked at <a href="http://treesurgeon.codeplex.com/" rel="nofollow noreferrer">Tree Surgeon</a>. It didn't satisfy me. After installing it, I saw that it was designed to at most Visual Studio 2008 and it just takes the project name from the user. So, Tree Surgeon was not a solution for this problem. </p> <p>What I need is, to learn how to code a new project's structure and create it programmatically. After finding the answer, I'm planning to have a project such that, when you write your new project name, database name(s), table name(s) and which type of classes you need in your browser,then both T4 and C# will works for you and ta-da! You will have a new project that has controller, helpers and in there new classes.</p> <p>Is it possible? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload