Visual Studio Custom Tool

Oct 11, 2010 at 11:37 AM

Hello, I've read the installation topic and I was wondering if anybody got the idea to create VS Custom Tool for generating classes? It is usual for this kind of tools to have one and then integration with VS is less painful. What is more creating such a thing is a matter of about an hour of coding (or less for someone who has done that before).

Oct 11, 2010 at 3:24 PM

I wasn't aware of that option.  Sounds great though and it sounds like you know how to do it.  I am sure a lot more than I would really appreciate such a tool.

Oct 11, 2010 at 9:57 PM

I can certainly do it, but I need time to dig through the source code of Linq to XSD and find methods that really do the job (and return string or write output to a file).

Nov 15, 2010 at 6:36 PM

I've been digging through LinqToXSD and custom tool possibilities today and news aren't very satisfying..

LinqToXSD class generator to work well needs at least a configuration file to configure the namespace, however there is no way* to pass parameters to custom tool so no configuration at all is possible in this case. I thought about setting default parameters, but that isn't really a good option too.

For me generating classes manually using LinqToXSD console tool and a batch file is now the easiest working solution.

 

 

* - at least any way I know and I've been investigating this a bit today. If anyone can prove me wrong I'll be happy to hear about it.

Nov 15, 2010 at 6:57 PM

Thank you anyway for trying and reporting back.  When I resume my coding I will explore the manual approach per your suggestion.

Feb 23, 2011 at 10:52 AM

There is a build task included which generates the code from your XSD, so there is no direct need to build a generator.