Windows Explorer - Dynamic Icons For Same File Extensions - visual-studio

For Visual Studio .sln files, Window Explorer is doing something "clever" to figure out whether to display the v8 or v9 icons.
Now when it comes to double-clicking/launching the icon, I know that it goes through a "Visual Studio Launcher" app which looks at the version info in the sln file and selectively runs VS2005 or VS2008
But any idea how it does the icon part. Presumably that simply by browsing to a folder, something is opening the file in the background and making a decision on which Icon to use, but its so seamless/quick.
Any idea how it's done. We have config generator here, that gets updated deployed by ClickOnce but it would be nice for people to see at a glance which version of the generator app, created the config files.
Cheers,

I think this is what you're looking for?
How to Create Icon Handlers

Take a look at this part of a tutorial to shell extensions on custom icons.

Related

how to get color code on my code FOR EXAMPLE (Debug.Log) to be in a color?

s
I want someone to tell me how to put colors on the code so its easier for me to code.
I think you forgot to select unity c# components when installing visual studio,
try again with visual code
If you are talking about Intellisense / syntax highlighting, you need to make sure that you installed Visual Studio Tools for Unity (Note this is needed for Visual Studio only and you may already have it installed).
Then follow these steps:
Close Visual Studio
In Unity, go to Edit > Preferences > External Tools
Click on the External Script Editor dropdown (this should be on which ever Visual Studio editor you are using or any other supported editor).
Make sure Embedded packages and Local Packages is checked under Generate csproj files for:
Click on Regenerate project files
Open any C# script and check if syntax highlighting is working.
In the worst case, if that does not work, you can close Unity and delete everything except the Assets/ and Project Settings/ folders (as well as anything you explicitly added) in your project's root directory. Unity will regenerate the project folders and files again when you open the project in the editor. It may just be that some of your project files were corrupt.
Also, in case I misinterpreted your question and you are talking about coloring the output in the console window within the editor, you can try using rich text which I believe is supported by Unity's console window in the latest versions.
Example:
Debug.Log("<color=red>this is red text</color>");
For more info on that:
https://docs.unity3d.com/Packages/com.unity.ugui#1.0/manual/StyledText.html

VS2019 Extension how to add a new Top Menu

I am trying to create a VS2019 extension that adds a entire new menu to the top menu. My goal for this is to write an extension that actually works with the TC3 XAE shell which is a VS isolated shell application. This has been done by one guy with the STweep extension.
Top Menu of STweep in the XAE shell
Through some digging to install an extension into the XAE shell you just have to manually place the unzipped .vsix file contents into a folder.
C:\Program Files (x86)\Beckhoff\TcXaeShell\Common7\IDE\Extensions
This works with the demo of STweep. I can simply copy and paste the contents of his extension into the XAE shell and it works.
So I am trying to develop my own extension. I am trying to do this with VS2019 community. I can easily build an extension that adds a button to an existing menu like tools or edit. There are a bunch of videos on how to do this. This will work in VS2019 but no the XAE shell. If I take the same extension that works in VS2019 and puts a button in the Tolls menu, it doesn't work in the XAE shell. Not surprised. So, I am trying to figure out how to make a new top menu and this seems to be rather difficult to accomplish.
I found this guys site. He has an example of how to make a top menu item. It must have been built in VS2015 as it doesn't work in VS2019 when compiled. I went down the path of migrating the project and even in VS2019 when running the project the top menu doesn't show up.
Does anyone have a good link to a tutorial on how to accomplish adding a top menu in VS2019?
If anyone else has this problem, the solution was to start the extension in VS2017. It looks like the shell for XAE is built with the isolated shell 2105 or 2017. Starting an extension project with VS2017 worked right out of the box. Same steps in VS2019, different libraries are used and it simply doesn't work. Hope this helps someone.
You need to go to Extensions - Customize Menu to enable top level menu for your extension:

Viewing binary files in MSVS under Windows 10

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.

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