Viewing binary files in MSVS under Windows 10 - visual-studio

For ages I've been using MS visual studio 15 to view binary files, simply by doing file|open. My files have a custom extension, 'SQ3', but VS seemed to happily infer that they aren't text, and display them as binary. However, Win10 seems to have stopped that. Now if I do the same thing, a popup appears, asking me whether I want to find an application from the shop, or always use this application (presumably MSVS, the one I'm invoking from). There's a proceed button, but it doesn't respond. There seems to be no way that I can get VS to open and display the file.
Is there a way to stop the OS intervening so VS can do its thing?
Incidentally, having to rename files would be extremely inconvenient in this situation. TIA
Thanks, that's perfect.

In Visual Studio go to Tools/Options/Text Editor/File Extensions.
Add new entry to the list:
Extension: sq3
Editor: Binary Editor
Click Add and then OK to close the dialog. Files with .sq3 extension will now open with the hex editor when opening them or dragging them to Visual Studio.

Related

Visual Studio files association in Windows

In Windows Explorer when I double-click on any Visual Studio file (*.cs, *.csproj, etc.), it's opening an old version of VS instead of the latest one (VS 2017). And VS has associations with too many file types.
How can I change the default Visual Studio (for all those files that VS can handle)?
There is a similar old question about Visual Studio 2008 (Move file associations from Visual Studio 2005 to 2008) but the solution in there doesn't work anymore (there is no "Restore File Associations" button on the settings of Visual Studio 2017).
Each version of Visual Studio registers itself in the Set Default Programs panel of the Control Panel.
Go to Control Panel\Programs\Default Programs
Then choose Set Default Programs:
In there you can simply choose the Visual studio version of your choice and then click the button Set this program as default in order to associate every file type that VS handles.
Or you might prefer to click the button Choose defaults for this program to review the current associations of those file types and change only the ones you want.
Yet another in a long list of previously working-just-fine things which Microsoft have managed totally #$#%# up. If I try to change defaults the 'right' way I get this kind of thing:
i.e. completely ignored. The only way I've managed to solve it is by removing the file association entirely through the registry. Let's take .asm as an example:
Open Registry Editor / "regedit.exe"
Navigate to HKEY_CLASSES_ROOT\.asm\OpenWithProgIds
Delete any Visual Studio values you see
From there, you can (finally) open files with whatever you choose instead of having the association clamped to Visual Studio:
For the record, I believe this to be a problem with Windows 10. Not with Visual Studio. See: https://answers.microsoft.com/en-us/windows/forum/windows_10-files/cant-change-default-programs-in-windows-10/229fc3a9-25c9-433b-a333-5806bc5090db
On the file you will always open with vs17, click right and choose open with and there choose another app. On win10 it pop out a dialog with some proposals. If vs17 is there, choose your favorite and activate the always open with. then ok and your done.

Change Ctrl+Click Behavior in VS Output Window

Is there a way to change how links are opened from the Output Window (not an Editor)?
Meaning, when the Output Windows detects a link, it's Ctrl+Click-able and opens in an Internet Explorer tab.
I'd like to change the target from IE to the Text Editor and still within Visual Studio.
There are solutions for changing the click behavior in an Editor, but I am asking specifically about the Output Window. I understand the answer might just be no.
There's a Visual Studio Extension that lets you open URIs in the browser (https://visualstudiogallery.msdn.microsoft.com/46c0c49e-f825-454b-9f6a-48b216797eb5).
I've forked it and made some updates so that it will handle file:/// URIs as well, opening them in the Visual Studio editor or an external editor. I've published a debug version that hasn't been very heavily tested here. You can peruse the full source of my fork here, or the original source here.
This makes debugging/working with the BizTalk map/schema tools a lot better...

Visual studio does not show content of files

Picture says it all, it should currently be showing a file but as you can see its having issues drawing the content of the file.
I have unloaded all addons and restart visual studio.
If it mathers the previus project was a VS 2k8.
New Info:
If i wait a good 5min ( I have a Quad core I7 with 6gb ram, 295gtx. VS is running from a SSD).
It will load the text, but im unable to "edit", as it will have loaded some document (.cs ) but when i select the one i want to edit it not realy open that file.
It can best be described as visual studio having a 5min lag.
I had this precise bug. I would open files from the solution explorer but the editor window would either not appear, only 1-2 lines of 100+ line files would display, or the file would display but I could not scroll or otherwise edit the file. Some parts of VS were working, i.e. little tooltips would appear if I moused over the right part of the (invisible) text but I obviously couldn't do much in this state.
I have a lot of VS stuff installed so I thought it was some sort of plugin or extension that was causing things to go screwy. These installed items include:
Visual Studio 2010 10.0.30319.1
ReSharper 5.1.3000.12 (JetBrains)
DevExpress DXCore 10.1.5 (free community edition)
DX Source Outliner (reason for DXCore, from sbohlen)
Tabs Studio 2.0.6 (www.tabsstudio.com)
Productivity Power Tools 10.0.11019.3 (Microsoft)
Snippet Designer 1.3.0 (Matt Manela)
I solved it (2/18/2011) by Tools... Extension Manager... disabling the Productivity Power Tools and Snippet Designer. No idea what was going on but this fixed it for me and I was back to work. Probably something in the system drawing and/or display options.
EDIT
The issue continues. Unfortunately it is intermittent and I have not be able to reproduce it reliably. Now the suspects are the BugShooting and CaptureWiz screen capture tools. I've had the behavior show up and then disappear in and around the time of logging bugs with them.
2nd EDIT
The issue continually continues. I have not yet been able to determine the cause but usually quitting VS and restarting resolves the issue(s). Other parts of the behavior includes the menu options (File, Edit, View, etc.) not operating properly as they show only the highlight but not the actual menu items. The solution will build and run just fine, but things still won't show up properly.
I had a similar issue whereby VS2012 was telling me that I had active (open) files, but the text editor was not displaying them. Clicking on the file(s) in the solution explorer seemingly did nothing. Alt + Tab just cycled through the open files, but still, nothing rendered on screen.
I solved it by clicking on the "WINDOW" menu item and then"Close All Documents". Visual Studio then behaved as expected and opened (and rendered) the files correctly.
This bug was created by mumble 1.2.x, but is fixed in the snapshot versions of 1.3.x. YOu can likely get simular bugs by other software that does DirectX overlay.
I had the same issue in Visual Studio 2012. It was fixed by running a repair of Visual Studio 2012 via Add/ Remove Programs.
The following had no effect:
Closing and reopening a solution
Opening different file types
Restarting Visual Studio
Adding and removing plugins
Resetting options via the 'Reset all Settings' option in Visual Studio's 'Import and Export Settings'
Rebooting windows
I had this problem in Visual Studio 2013. Problem was: extension "Regex Tester". I had to uninstall this extension.

Will VS 2010 display recent used project and solution in the context menu of the start menu?

Start menu in Windows 7 has a feature: a programs, pinned to the top, can show a context menu with recently used files:
alt text http://img65.imageshack.us/img65/5149/contextmenustartmenuwin.png
Will Visual Studio 2010 be able to display also recently used Projects and Solutions?
It is possible to pin solution files to the recently used file list.
First make sure you already have Visual Studio pinned to the Start Menu.
Next, drag the Solution file on to the Start Menu so that it is pinned in the main list.
Now select the the Recently Used Files button for Visual Studio so that the list is showing.
Drag the solution file from the main list into the recently used file list.
You can now remove the solution file from the main list.
Beta 1 doesn't seem to support this yet. Its easily possible by using the new Taskbar APIs and specifically the custom categories feature. I think their main problem might be that the solution files are associated with an app called VSLauncher.exe (this small app determines what version of VS to load when you launch a SLN file).
If you want to "pin" your fav solution files to any version of VS, one option this is (I currently used this with VS 2008 and 2010 Beta 1:
Open Explorer and browse to any SLN file you want to pin.
Drag it and pin on the taskbar (it will pin to VSLauncher.exe; this is okay)
Now just repeat the steps for other SLN files.
When you click on a SLN file from the above pinned program's jumplist, another instance of VS2010/VS2008 will launch. It won't show your recent projects or solutions, but atleast it allows you to pin your fav/recent solutions manually. I think you can use this for CSProj or other project files as well.

Can't "go to declaration" in *.ashx files (Visual Studio 2008)

When I open *.ashx files in Visual Studio, I don't have the helpful "Go to Declaration" context menu when right-clicking on a function.
How can I restore this functionality (this is a new install)?
Thanks very much.
Click on the text you want to go to and key F12 if it's not showing up for you.
Much like Windows Operation Systems need to reboot when things start breaking down, Studio sometimes needs a restart if that doesn't work.
Obviously this doesn't get your menu item back, but it's a fix that you might prefer over selecting that from the right-click mouse menu.
This is a shot in the dark since I do not work with ASP-related stuff.
Short Answer
If your *.ashx files belong to a project, open the project first.
Longer Answer
Most of my work in Visual Studio 2008 is with C++ and C# code. If I open a .cpp file or .cs file in VS2008 independent of the project it belongs to, VS2008 doesn't give me the Go To Declaration context menu either. When I open files independent of the project they belong to, VS2008 (or any Visual Studio version for that matter) is little more than a glorified editor. To get the benefit of Go To Declaration and other features, e.g., Intellisense, I have to first open the project and then open the file from within VS2008.
Alternate Answer
If you are already doing this, you might try deleting the .suo file in your project directory and letting VS2008 re-create it.
Apology
Sorry if this was simply stating the obvious. I know I've been frustrated at times when I've opened a file outside the context of its project only to realize what I want to do requires me to open the project anyway. Someone new to Visual Studio might not realize the project is sometimes required.

Resources