Build Order in Output Window Missing with Lightweight Solution Load - build

I've toggled back and forth between normal solution load and lightweight solution load. In the latter, when I go to the output window, the Show output from dropdown does not have the Build Order view.
Is this a bug, by design (because something about the lightweight-ness prevents this option), or is there something else I need to do to enable it?
I'd like to enjoy the quick load time, but have the build order available when trying to know which error to fix first.
EDIT
On a different solution, Build Order shows up in the dropdown, but during and after a build, the output is empty. Switching back to Build shows that the solution built because the build outputs show up.

Related

How can I improve the usability/readability of Toad

I have installed Toad 12.8 and I had a pretty big mistake in executing code. I executed code out of sequence, despite triple checking my work. Some how the tab I had selected was unselected and another script was ran. I still wince in embarrassment a week later.
I just wanted to know if there are ways to improve usability/readability of Toad. For instance, can I highlight the tab I have selected? Can I review scripts in a viewer to showcase scripts that I have open and manage which have been executed and not?
I have changed the tab style to 'Flat Buttons', which better showcases the script you are viewing among the many you have open, but thats just 1 small change.
Anyone else have options they like to use? Im not seeing a lot of options here under View Options...
I'm on 12.5. Current tab is highlighted (i.e. has a different color than other tabs). You could, though, change the window background color (by default, it is white).
Open "Configure TOAD options" and search for "TAB", you'll find quite a few options in there.
If you want to review what you've executed, navigate to "Query Viewer" tab in the Editor window. Sort results by "Start Time" in descending order and it'll show what you executed, when, how many time was spent on it, how many rows were affected ... quite useful.
As of running code you didn't mean to: well, what can I say? I'm sorry you did that, but - after all - it is you who should pay attention to what you are doing. No highlighting will solve that problem (also know as we have met the enemy, and it is us).
Something I like to do to is to change the color of TEST vs PROD in order to make them stand out. On the session/new connection window, scroll right and you'll see a "color" column. I set PROD connections to Red and TEST to Blue. Give it a try, maybe you'll like it for a visual reminder for the environment you are working in. It will change the status bar background color so it's not that intrusive.

Disable lightweight solution load prompt

In VS2017 lightweight solution load is disabled by default and since I don't want it I am happy. BUT there is an annoying prompt which prompts me to enable it when I load a solution with a "Large" number of projects.
Is it possible to disable this prompt, so I do not enable it by accident ?
I have searched Tools -> options and the registry to no avail. Also what is a "large" number of projects I have not been able to find the number. Perhaps if one could raise the number to say 100000 then the prompt would never appear.
The Lightweight Solution prompt is shown three times, per solution, then a setting is stored locally which prevents it being shown again.
From: developercommunity.visualstudio.com: Viktor Veis: 27 Mar 2017:
The lightweight solution message is
shown 3 times per solution. These settings are stored in the suo file,
so deleting the file or the .vs folder next to solution will trigger
another 3 messages.
We're working on improving this experience in a future release.
Beetlejuice! Beetlejuice! Beetlejuice! Sigh
This message do not show again after setting the Lightweight solution load to disabled instead of default.
To do this, select your solution and in the property window (default F4) set the Lightweight load to Disabled
Screenshots here https://learn.microsoft.com/en-us/visualstudio/ide/optimize-visual-studio-startup-time#speed-up-solution-load

File path requirements in VS debug output window for navigating to the code

There is a neat feature in VS that allows you to navigate to the line that has produced the debug output by double clicking on it. It has been covered in multiple questions here and I was happily using the feature until I had to refactor the project a lot to make it cross platform. The refactoring included stripping full file paths from the log messages just to make the lines shorter. However after this move the double click feature in the log does not seem to work any more. Another thing is that now the sources are not stored in the same directory as the projects (maybe this also has some impact when using only filenames in the log instead of a full path).
So the question is - does VS require a full path in the debug output window messages for the double click navigation to work or does a single file name work as well? If the latter is true, are there any requirements on the layout of the files relative to the solution for this to work?
To be more illustrative of the issue here are two screenshots of working and non working output.
This works:
This does not work:
By looking at the length of the relative paths in the working scenario I think it seems logical that I want to reduce them, however if there are no means of doing this and preserving the debug output navigation feature I'll have to leave the long ugly paths.

Visual Studio 2010 Improperly underlining code/comments with red error line when there is no error

I am working on a rather large project, and I am having strange problems with the IDE in terms of error checking and somewhat with IntelliSense.
Usually if I were to type something boneheaded, like "int a = "aa";", it would underline "aa" in red. However I am seeing VS do this to random parts of my code when I make insignificant changes.
For example:
/*
Some comment here, just going to stretch it out for my example..
*/
int proto1();
int proto2();
If I make changes to other parts of the project, sometimes random functions will get underlined, and even part of a comment. Like just 30 minutes ago it underlined the equivalent of half of that comment beginning in the middle of the word "comment", also it underlined all of int proto1(); and part of int proto2();
I would post screenshots but I am bound by contract not to disclose any work, and I can't easily replicate it in smaller projects.
I don't understand why it does this. When I compile the project, any fake errors and underlining it did goes away and it compiles fine. The point though, is there are no errors. It's making up random errors and underlining random lines/words/half words. I would also like to note that there seems to be a large delay in loading new intellisense information, almost by 2-3 minutes or longer.
I'll try and reproduce it in an unrelated project and post here if I can. However, any help would be appreciated.
Thanks!
*Edit: Forgot to note that hitting the space key several times will on occasion correct the errors however this isn't reliable and does not always work.
Intellisense sometimes can really get stuck with complicated code. I guess until VS2012 release comes out, there's nothing we can do.
There's however one trick that I'm using if this happens - switch your build configuration Debug -> Release and then back again. You don't have to wait, you can just click two times on this drop-down box. It should refresh IS cache and make red error underlines dissappear.
Intellisense is often off, but make sure you have latest updates installed.
I just installed sp1 yesterday and lot of Intellisense issues went way.
I see this is a stale question but some may find this helpful.
I just had this same issue. I tried many of the solutions outlined here and elsewhere. I finally tried running Visual Studio as another user (Shift Right Click Run As Different User) and the issue did not present. I then logged into my computer as another user and deleted the profile of the user I was having the issue with.
If your profile is important to you or there is information within it that is important I highly recommend backing up relevant information first. If you don't understand what information you profile contains make sure you do prior to deleting it.
1) Log in as different user (with admin privileges) than you want to delete
2) Open Properties for Computer
3) Advanced system settings (on the left side)
4) Settings for User Profiles (in the middle)
5) Select the profile you want to delete and click the delete button
6) Reboot
Credit to:
https://superuser.com/questions/63017/how-do-i-delete-a-user-profile-on-a-windows-7-machine-that-is-part-of-a-domain
I had the same issue, and in my case it was mostly related to library functions and types defined in libraries. This one fixed it for me:
Open command line parameters. You can use following to reach there:
Project > ProjectName Properties > Configuration Properties > Linker > Command Line
In the Additional Options box at the bottom add
/I "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"
You will of course need the correct path where Visual Studio is installed.
Bingo! I hope it works for you too. :)

How to write a shell extension in C++?

This seemed like a common question but after doing some searching, I wasn't really able to find my answers. There is an article on this here:
http://www.codeproject.com/KB/shell/shellextguide1.aspx
But it's for a very old version of Visual Studio. I'm using VS 2008, so the instructions and interfaces don't seem to match what I'm seeing.
I want to create a simple shell extension using C++ that creates a context menu for files with extension .GZ. When right clicking on these files, I should be able to click my context menu item and have a callback in code to do some sort of operation on that file.
Other context menu items would do things like spawn modless dialogs to accept user input before executing some action.
From what I've seen, ATL is used for this but I have never used ATL, so all of the object types and interfaces are very confusing to me. It wouldn't be so bad if I had a proper tutorial or documentation to read.
Can anyone help me out? Isn't there some sort of tutorial out there that isn't 10 years old?
I can't tell you exactly how to write a shell extension, but I will provide a number of tips. Writing a Shell Extension offers some significant advantages over the much simpler “registry-only” method:
With a Shell Extension, you can dynamically create a context menu item (or submenu) that is more relevant to the selected file(s). For example, if you are writing a Shell Extension for zip files, it is possible to create a submenu within the context menu that shows the entire contents of the zip.
You can handle multiple files simultaneously, which may be more beneficial not just for performance purposes but also so that you can work out what to do based on the selection as a whole rather than just for each file.
Some of the downfalls to Shell Extensions are:
Substantially increased complexity. Be prepared to spend a lot of effort on this to get it working. Have a home-espresso machine installed next to your computer and/or hire someone to make you coffee.
Substantially increased difficulty in debugging. Ditto about coffee.
It's difficult to write a Shell Extension because they can be very hard to debug.
Shell Extensions are loaded by the explorer.exe process, and without specific configuration of Explorer, you need to force-quit the explorer.exe process so that you can install a newer version of your Shell Extension. There is a way to get Explorer to unload DLLs that it is no longer using, but you should only do this on a development machine and not on a deployment target:
In RegEdit, browse to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer
Add a new DWORD key called “AlwaysUnloadDLL” and set its value to 1.
Restart explorer.
This works most of the time, but there may still be times where you need to close Explorer because the Shell Extension was not unloaded.
Keep in mind that your Shell Extension may be loaded by other applications, for example, if you right-click on a file with an applications “open file” dialog, then your Shell Extension will be loaded into that application, and not Explorer.
If your Shell Extension causes a runtime error, quite often the result will simply be that your context menu item does not show, very rarely will you be told that your Shell Extension failed to load or that it caused a runtime error.
Configuration can be hard, even with an installation, registry data needs to be created in several places, and depending where you want your context menu to show, the places in the registry may differ between different versions of Windows.
What you'll need to do:
Visual Studio offers some shortcuts to creating Shell Extensions, but basically you'll need to create a COM DLL. A Shell Extension for context menu items must implement both the IContextMenu interface and the IShellExtInit interface.
In the IShellExtInit::Initialize() method, you can obtain the selected files from the IDataObject parameter. From memory, the data is in “Drag-n-Drop” format, so you need to get an HDROP handle from the IDataObject and query the files from there (this is from memory, it may actually be different than as I described here, so proceed with caution).
Once your DLL is ready to be “installed”, you must copy it somewhere, and then run regsvr32 to make sure it is registered.
Follow this guide to know where to put registry keys.
There may be issues with 64-bit Windows, if you build a 32-bit DLL it may not load in 64-bit Explorer… so keep this in mind if you are having trouble with 64-bit Windows.
Your DLL will actually have two GUIDs associated with it. I can't remember exactly how it works, but one GUID refers to the DLL itself and the other refers to the actual Shell Extension. Make sure you use the GUID of the actual Shell Extension when creating keys in the registry where a GUID is required.
All things considered… (tl;dr)
Weigh up the costs of whether a Shell Extension is worth it. If you want to create menu items dynamically based on the selected files, then a Shell Extension may be the only way. If you want to handle all files simultaneously then you'll probably need a Shell Extension as well.
An alternative to the context menu method, could be to have a drag-n-drop target on the user's desktop or something. Explore other ways that you could have the user submit your files to your application, because a Shell Extension is often far more effort than it is worth. I found this out the hard way and I think everyone else has too.