
protobuf-net - issue #39
Make it easier to use protogen in a build task / pre-build step
Comment #1
Posted on Jun 24, 2009 by Grumpy BirdSee the attached for a quick and dirty Visual Studio Custom Tool wrapper around ProtoGen.exe. This makes adding .proto files to C# projects extremely easy.
... stackoverflow didn't seem to have a way to attach files, so I attached it here.
I will also post a comment on stackoverflow pointing back to this.
- ProtoBufGenerator.zip 1.22MB
Comment #2
Posted on Jun 24, 2009 by Grumpy BirdI was incorrectly adding a new namespace around the ProtoGen created namespace instead of using the -ns cmdline param. This is fixed in the attached file.
- ProtoBufTool.cs 8.58KB
Comment #3
Posted on Jun 24, 2009 by Massive BearCool - I will investigate; thanks
Comment #4
Posted on Jun 26, 2009 by Massive BearHi again scooley - I've had a look at this, and it is very good. I actually started doing this a while ago, but got lost in the maze of random interfaces and side-lined it, so it is fantastic to get this. I'm probably going to make a few tweaks though; in particular, to call into protogen as a reference (rather than Process), and to keep the xslt as files (rather than resources) to allow user-customization. I have, however, moved protoc.exe into protogen as a resource, which simplifies things.
I'm very grateful for the contribution. My explicit assumption is that by posting it here you're happy to contribute it under the existing license terms of protobuf-net; if not, please say so now.
Huge thanks,
Marc
Comment #5
Posted on Jun 26, 2009 by Grumpy BirdMarc -
I'm glad that you find the tool useful and want to include it in protobuf-net.
I'm all for it being added in to the main protobuf-net project so that going forward
it stays up to date with the rest of the project.
I had originally planned to directly call protogen code (instead of the exe), but it was quicker for me to just launch the exe since it didn't require me to understand the protogen code.
Yes, I posted this so that it could become part of the protobuf-net project (under the protobuf-net license). The only thing I must point out is that the code in the CustomTool folder comes from http://customtooltemplate.codeplex.com/ - The CustomToolTemplate license is wide open and can be read at http://customtooltemplate.codeplex.com/license .
Comment #6
Posted on Jul 16, 2009 by Massive BearFixed; now has VS2008 "custom tool" support; see blog
Comment #7
Posted on May 29, 2014 by Quick ElephantIs this custom tool support available for visual studio 2012 or later?
Status: Fixed
Labels:
Type-Enhancement
Priority-High