Visual Studio 2010 stops implementing changes to executables - c++

I believe there is a glitch in Visual Studio 2010 which has haunted me for several years, across numerous different computers irrespective of the Windows version. It happens in both the express and ultimate editions. I have tried restarting my computer, instead of using shutdown, which did not help.
After coding for a period of time, I will make a change to my C code, for example changing something or perhaps adding a message box. However, this change does not appear in the executable, and I often make numerous changes before I realise this glitch has happened.
I have made a habit of clicking save all, save, Clean Solution, and then Build. There are no errors, warnings, and I can check the executable was not in the release folder before compilation.
I routinely lose hours of progress from this bug, as I am mislead into thinking my bug fixes are incorrect, when in actual fact Visual Studio has decided to ignore my changes. It appears to occur when I am rapidly recompiling my executable because I am only making small changes, such as changing strings, and I need then execute the binary to check the changes.

Related

Visual Studio clears command line arguments when begins to run

In my solution, I have a Visual C++ project which uses
Platform Toolset = Visual Studio 2013 (v120)
which I am opening in Visual Studio 2019.
If I edit the Project Properties > Configuration Properties > Debugging > Command arguments to something , and do OK it goes well, as if I open this dialog again is everything OK.
But when I run the application, the Command Arguments got cleared, for the specified configuration, as the same odd behavior happens both in Release and Debug Configurations. This way I can not use VS interface to parameterize the command input.
The moment I hit the Play button, the parameterization has disappeared: 🙁
Help, please.
UPDATE:
It seems to be an extension causing the strange behavior. I disabled every extension I could, and the behavior is not happening now. When I have time, I will try to cherry pick what extension is annoying me and give more updates.
UPDATE 2:
I just enabled extensions by blocks of a few alphabetically and ended up with all of them being enabled, and seen VS is just behaving well. I am believing the fact of disabling some extension has put things back on track.
I just uninstalled an extension named "Smart Command Line Arguments" and now things seem to work fine.
May be I was using wrongly, I don't know.
Now I will be continuing my work, and if I don't find any problems, I will accept my present answer.
It happened to me today again. I did some disk cleaning some days ago, I may have touched something in Visual Studio 2019.
Now, I was getting the same problem. This time, after seeing VS having several times this bad behavior, I tried to change the command line arguments, DID NOT start debugging, then I restarted VS, started Debugging again and now it seems to do what is supposed, not to clear my command line arguments customization.
UPDATE: this is happening again. It happens when it is not the first time I click "Start Debugging" after starting Visual Studio. So this implies I will have to restart VS almost every time I want to start debugging, for not getting the command line arguments cleared. ☹

Updated Visual Studio, OpenCV Project No Longer Working

I had this working OpenCV project in visual studio 2017. I update Visual Studio to version 15.6.4 yesterday and the project no longer worked. The include files are still there, so are the dlls. The environment settings have not changed.
I tried opening other OpenCV projects that I know also worked for sure before the update and I'm getting the same error so I know my it's most likely not my code.
Here are the errors I'm getting:
I'd really appreciate any help if possible. It was a huge hassle for me getting the environment running the first time and now for this to happen is insanely frustrating, I just really want to start worrying about the actual code instead of all these inconvenient problems that are stopping me dead in my tracks.
After the update, the project was targeted for Windows SDK version 10.0.16299.0 which was not found on my device.
I right clicked on the solution and clicked retarget solution and that fixed the problem.

Visual studio c++ project go to definition opens object browser instead of going to source code

I have seen the following questions and tried all of their answers:
Visual Studio Go to Definition (F12) opens Object Browser instead of Code View
How can I turn "Object Browser" to "Metadata" for "Go to definition" in Visual Studio 2010?
Namely that I have tried:
Cleaning the project and deleting all generated project files
Resetting all of the keyboard mappings
The difference in this question from the previous listed is the following:
It is a C++ project, not c#, there are no references and no .NET version.
I have not installed nor do I use the ReSharper program.
I have tried checking out the same code and solution in a separate directory, and the problem no longer occurs (but still occurs in the original after a clean checkout)
This started today, and I am unaware of an event that could have caused it. I have not installed any new plugins or similar. The only thing that has happened recently was that yesterday I installed some NUNIT references into a C# project that is in the same solution.
Since the other posts listed above did not list explicit details about the problem, this is a detailed description of what is occurring:
I try to go to definition on an object (or go to declaration), with either F12 or the right-click menu:
Instead of going to the source of this (ie the HeartBeat class) it will show in the symbol search a list of possibilities:
All of these references open the object browser window instead of going to the source:
How can I revert the behavior of visual studio to normal?
As the OP mentioned, /resetuserdata will definitely bring your Visual Studio back to normal as follows:
devenv.exe /resetuserdata
although this is not the fundamental solution.
This kind of weird situation can occur especially when you run multiple Visual Studio at the same time, and you changed a few configurations only on one of them.
That's because Visual Studio tries to share the same .vssettings and the file is over-written every time it exits, to keep .vssettings to have the newest configuration sets you made at all times - the definition of the newest configuration is the one the last Visual Studio that you closed has.
Therefore, the configuration change that you think you've made might not be the one your Visual Studio is running on.
To prevent this from happening, you could make your .vssettings Read-Only.
Then every time you close it, your VS will complain about it, but you can keep your customized configuration safe. (Which, I agree, is sort of ugly though)

How to save state of Visual Studio C++ debugging session?

I am using Visual Studio C++ 2013. I am running a number cruncher program so it proceeds linearly/predictably. However I have a test which takes several hours to run, before asserting due to logic error in my code. I can get a breakpoint before the crash, but I can't step backwards without starting all over again.
Is there any way to get Visual Studio to save the state of my program, so that I can restart at that point again?
The program state is very complicated and it would take a lot of work for me to save all the state to files myself for resuming later.
When debugging in Visual Studio (even from a breakpoint) use Debug|Save Dump As... to save the current debugging state. When saving, make sure you select "Minidump With Heap" so you have access to heap memory.
Later you can double click the .dmp file to open it with Visual Studio right where you were.
You may consider virtual computers. You can make their snapshots and save them. This may be an overkill, but is guaranteed to work.

Visual Studio 2010 (C++) highly unstable

We recently moved over to Visual Studio 2010 from 2005 and the environment have turned out to be highly unstable.
I experience 10-15 crashes per day at random locations , msenv.dll and vcpkg.dll to mention a few. It can be while selecting text or compiling, not found any pattern.
The plugin we got is VisualX Assist but I doubt that there is a problem with that.
Anyone here at Stackoverflow that experience this and/or know if there is any updates to apply to a default installed VS2010 ?
My Visual Studio 2010, without any plugins, was similarly unstable when I first installed it. I got updates from Microsoft Update, and it rarely crashes now. I never bothered figuring out exactly which update was key. It might have been a driver update, or an OS update, or a .NET update.
I'm running VS2010 10.0.30319.1 on 64-bit Windows 7. It's still slow, and it occasionally becomes unresponsive for a minute or two, but it doesn't crash very often now.
If you're up-to-date, and it still crashes, I'd be very suspicious of all plugins.