Excellent! I hacked something like this together for my own use but it's not clean enough to commit.
Jeff. On Fri, Mar 12, 2010 at 8:22 AM, James King <james_...@dell.com> wrote: > I would like to know how I can contribute something back to the project. > > I have a single file code generator for Visual Studio 2008. This > allowed > me to remove the pre-build batch script from the C# ThriftTest project > that is part of the solution, and now .thrift files are treated as > native files in the IDE. When you add or create a .thrift file in a > project, the thrift compiler runs and the resulting output files are > brought back into the IDE as a dependent .cs file under the Thrift file. > It essentially ends up looking like this: > > [-] ThriftTest.thrift > +-- ThriftTest.cs > > As you edit the thrift file, it regenerates the .cs file. When the > Thrift compile succeeds you have something you can build into a class > library immediately. If the Thrift compile fails, the .cs file > contains the build error, and your project obviously does not build. > I like this better than having an exception pop up, since you can > read the whole error message. > > The preferred way of using this is to put the .thrift files into a > class library and then reference that class library in your client and > server. This does not enable .thrift style context sensitive editing. > It > is just a way to ensure you don't have to use pre build scripts or jump > to > the command line to generate code properly. > > > James E. King, III 300 Innovative Way, Suite 301 > Senior Software Engineer Nashua, NH 03062 > Dell (EqualLogic) HIT Team (ASM) (603) 589-5895 > >