rongfengliang / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

Custom Tool is not available for Visual Studio 201 (VS11) #332

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install Visual Studio 2012 (VS11)
2. Install protobuf-net-VS10.msi
3. In Visual Studio, right-click on a .proto, then "Run Custom Tool"

What is the expected output? What do you see instead?
I expect Visual Studio to call protogen and generate the .cs file.
Instead I get the message "Cannot find custom tool 'ProtoBufTool' on this 
system"

What version of the product are you using? On what operating system?
- Visual Studio 2012
- protobuf-net-VS10.msi (Apr 2010)
- Windows 7 64-bit

Original issue reported on code.google.com by benoit.b...@gmail.com on 22 Oct 2012 at 9:26

GoogleCodeExporter commented 9 years ago
Here is a workaround:
1. Execute the attached .reg file
2. Run "devenv.exe /setup" as Administrator

This way, the ProtoBufTool is registered and works fine in VS11.

Caution: I wrote this .reg file for a 64-bit system, you may need to modify it 
to make it work on a 32-bit.

Original comment by benoit.b...@gmail.com on 22 Oct 2012 at 4:08

GoogleCodeExporter commented 9 years ago
OK, it seems that the attached file can't be downloaded, so here is the .reg 
file : http://pastebin.com/vhS9VgNZ

Original comment by benoit.b...@gmail.com on 22 Oct 2012 at 4:11

GoogleCodeExporter commented 9 years ago
Is this approach still working. I followed it all on 64bit win7 on released 
VS2012 and no love.

Original comment by e...@directr.co on 15 May 2013 at 3:38

GoogleCodeExporter commented 9 years ago
I made a new revision of the reg file: http://pastebin.com/1XK3fuPQ
And i also made a batch file to make it easier: http://pastebin.com/aZvMB1rU

You just need to save the to files (ProtoBufTool-VS11.reg & 
ProtoBufTool-VS11.bat) in the same folder, and run the .bat in Administrator 
mode.

This is still restricted to x64 with default installations folder.

Original comment by benoit.b...@gmail.com on 15 May 2013 at 3:47

GoogleCodeExporter commented 9 years ago
Hi Benoit, 
Do you, by any chance, have a script for Visual Studio 2013? (Windows 7&8 x64)

Thank you, 
Cristian

Original comment by cristian...@gmail.com on 1 Aug 2014 at 11:50

GoogleCodeExporter commented 9 years ago
Cristian,

I was able to get ProtoGen working in VS12 by simply replacing all instances of 
11 with 12 in Benoit's reg file. I've attached a modified reg file for your 
convenience.

I can confirm this works with Windows 7 x64, but I'm not sure about Windows 8 
x64 since I haven't been able to test it. Your mileage may vary.

Original comment by brianrog...@gmail.com on 3 Aug 2014 at 2:23

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you Brian!

Original comment by cristian...@gmail.com on 26 Jun 2015 at 10:40