Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB.Net Code Generation

Posted on 2014-03-09
3
Medium Priority
?
656 Views
Last Modified: 2014-03-13
Dear Experts,

I have spent a few hours looking at the code generation capabilities of Visual Studio from a UML class diagram. I noticed that Visual Studio 2010 and 2012 have T4 templates only for C# and so the generated classes are in C#. My question is - Is there a way to generate VB.Net code from T4 templates? The most desirable solution for me will be a repository of VB.Net T4 templates or class, enum, struct etc. just as the ones defined for C#.

I have used tools like CodeSmith to generate C# code and so I am not looking for a code generator in general. My question is specifically for UML model to code generation in Visual Studio .Net.

Thanks for your help.
0
Comment
Question by:shekhar_shashi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Accepted Solution

by:
Kishan Zunjare earned 1000 total points
ID: 39916976
By using T4 template we can generate code, it is same like C#.

You can look at bellow example - Creating reusable code generation templates

http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/
0
 
LVL 15

Assisted Solution

by:David L. Hansen
David L. Hansen earned 1000 total points
ID: 39917653
You could take the T4-generated C# code and just convert it here:
converter.telerik.com

(there are several websites around that do the same thing).
0
 
LVL 3

Author Closing Comment

by:shekhar_shashi
ID: 39927064
Thanks for the great suggestions. I was hoping for a resource that can supply the equivalent VB.Net templates but looks like the options are:
- Create VB.Net templates from ground up.
- Generate C# code from the existing C# templates and transform the code to VB.net using one of the code converters
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question