Can I hex edit a file in Visual Studio?
I want to edit a binary file, but I don't want to use another tool other than Visual Studio because it's开发者_C百科 a pain to switch back and forth.
Is there perhaps an add-in or some built in functionality that can do that in Visual Studio?
- Menu File → Open → File
- Select the file to be opened
- On the open file dialog at the bottom there is a down arrow on the "Open" button
- Click "Open With..."
- Click "Binary Editor"
- Click OK
Or for the keyboard geeks out there:
- Ctrl + o
- Ctrl + v (paste filename)
- tab
- tab
- ↓
- w
- b
- Enter
In addition to Kevin's answer, with Visual Studio 2017 you need to have the Visual Studio C++ Core Features component installed.
Source
Another way to do it is to rename your file to .bin and drag it into VS editor
- right click the file in Solution Explorer,
- select 'Open With...'
- select 'Binary Editor'
Let's enjoy the hex world :)
精彩评论