A long running gripe with protobuf-net is that while the code generation (from .proto) works, it isn't easy to integrate into your development process. Well, wait no longer! I'm very happy to announce that protobuf-net now has Visual Studio 2008 support
This means you can add new text file called "mymessage.proto", and it will automatically start running C# (see below) code-generation on that .proto - writing a .cs file to match your .proto. This includes things like error-processing, so if you have errors in your .proto you can click on them and it will take you to the right place in the file. It will also add the protobuf-net reference if you don't already have it.
At the moment, protobuf-net lets you pass a number of options on the command line. This same functionality is available in the IDE too - just (ab)use the "Custom Tool Namespace" - it accepts a semi-colon delimited set of arguments (the first being reserved for the actual namespace to use if your file doesn't specify a package) - i.e. if you use the string ";fixCase", it will apply C#-style case fixups (so "name" becomes "Name", etc). The arguments are exactly the same as on the command line tool (protogen.exe).
The installer also includes (in the loosest sense) a custom item template, so you can use Add -> New Item to get a new .proto file with a suitable skeleton (including things like the project's namespace, etc). It doesn't currently install this template - and I'll be honest; this is simply because I haven't yet had time to crack the installer specifics of this (it is.... fiddly).
4a15465005