Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello CP,

I've been looking at making a code generation tool for Visual Studio.
There is quite some information on it, but how can I create a GUI to go with it?
The MSDataSetGenerator is a 'custom tool' (for XSD files) but unlike custom tool tutorials I've found in the web, it has a GUI.

So I was wondering, how you can add a GUI to a code generation tool?
Or am I looking in the wrong direction completely?
--edit--
Having built a code generation tool (for the .something filetype), how can I associate a GUI/Custom designer to it like the MSDataSetGenerator has?
Posted
Updated 16-Mar-12 0:09am
v2
Comments
Sergey Alexandrovich Kryukov 15-Mar-12 19:28pm    
Nothing wrong here (if only the whole idea of code generation is adequate to your ultimate goals), but the question is not clear.

Do you need UI for a tool itself? But in this case, you should know better how to make it, as you know better what code to generate, what are ins and outs. So, what's the problem?

(It does not look like you ask about generation of the UI code, but, just in case, I must say that UI code is no different from any other code; don't let the designer fool you -- the result is always the "regular" code.)

--SA

1 solution

Create a custom msbuild task[^] and use this to generate the code.

You can also add a Menu to the Visual Studio Menu Bar[^], and use this to display your designer.

Best regards
Espen Harlinn
 
Share this answer
 
Comments
Abhinav S 26-Mar-12 21:51pm    
Good links. 5.
Espen Harlinn 27-Mar-12 5:26am    
Thank you Abhinav!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900