Reputation: 16107
I'm trying to edit an existing .proto file in VS2010 to add a new property to it. When I get the Visual Studio tool to regenerate the class, it deletes the file instead.
Anyone seen this problem before?
Upvotes: 1
Views: 241
Reputation: 1062780
First thing to check; is the "custom tool" still set against the .proto file in the properties window ( f4 )
If it has deleted the file, I would expect that means the .proto is being problematic (in particular, it is very sensitive to encoding - it requires BOM-less UTF8 if I recall - a "feature" of the standard "protoc" that is used to parse the .proto into a tree).
If this is the case, I would expec there to be a build warning (which also tells you how to fix it, although rather annoyingly I think the UI is slightly different in VS2010 than VS2008).
I could also be entirely wrong; if so, please say so that I can investigate further.
Also: are you editing the .proto or the .cs? Avoid editing the .cs - if you want to add members, use "partial classes" instead.
Upvotes: 1