Erratic behaviour in Visual C++ 2008? - visual-c++

At first I thought I was going mad, but now I know I'm not. I've only been using Visual C++ 2008 Express Edition for a couple of weeks, but I've found that I have had a problem that I just can't get around, but returning to the program the next day I find that the problem has disappeared.
For example, the last time I was using VC++ I couldn't get Build to output an exe file, but today it has no problem.
Has anyone else found this? I like VC++ but I'm only a beginner and I don't know when it's VC++ being stupid and when it's me!

I've had Visual Studio act up before. Usually it just involves the entire application hanging intermittently. Restarting the application usually fixes the problem.
If this does not fix it, you might try examining the build log to see what's going on, if you haven't already.

Visual Studio changes the menu items based on normal development or debug mode.
So you can't build your exe or do some other things while you're debugging. Unfortunately sometimes you simply forgot that you still have a debug session open somewhere.
Pressing Shift-F5 fixes this.

Related

Visual Studio 2017. LNK1104: cannot open file ….\Debug\….exe after single successful build

I am having a very weird issue. I am able to build my C++/CLR Win Forms project with visual studio 2017 only once. Every next time I am getting “LNK1104 cannot open file ….\Debug\….exe” error.
What I have noticed is that after stopping debugging the program is still visible in Task Manager which is I believe the reason of getting the above message.
When I try to kill it am getting “access denied”.
The only way to compile the project is to restart visual studio. The process shuts down immediately together with visual studio. Once the visual studio is back on I can do a single build again.
I have tried to run "clean" project and solution.
I have also created new project and moved my files in it. What I have noticed is that before having my form filled with controls the problem was not appearing. It started happening after adding few textBoxes, ListView and buttons.
Any ideas how to fix it?
I figured out what was causing the issue. I have tried with switching off multiple Windows security features and finally I found the right one. The problem appeared to be a Windows 10 built in "Real-time protection" against malware. It can be disabled under "Virus & threat protection settings".

VS2012/2013 fails to display solution explorer

I have this problem with both VS2012 and 2013. When I load an existing or create a new solution I get a ProviderPackage error - An exception was thrown during package instantiation and was caught in the package manager. After I close the error dialog, the solution explorer window is empty, although there are solution files open in the editor.
The ActivityLog.xml file shows different modules loading when the error occurs, depending on the project type. Is there a way that I can determine the common thread between 2012 and 2013 that is causing this error.
There is probably a corrupted dll which I have to replace. I am dead in the water until I figure this out.
Help.
Clearing the Visual Studio Component Model Cache worked for me (details: Error message "No exports were found that match the constraint contract name")
None of the previous suggestions worked for me, but this one did:
http://www.hjerpbakk.com/blog/2014/7/25/no-content-in-solution-explorer-using-visual-studio-2013
This issue is because of a MEF cache corruption. Installing [or uninstalling any extension] will invalidate the cache causing VS to rebuild it.
I ran into the empty solution explorer with Visual Studio 2013, and fixed it with a repair install.
Solution: This worked for me.
I had the same problem in Visual Studio 2015 with the Solution Explorer always showing empty, even after deleting the ComponentModelCache folder. Looking at the Microsoft.VisualStudio.Default.err file, one of the errors was:
"----- Catalog construction errors -----
Error #1
Microsoft.VisualStudio.Composition.PartDiscoveryException: Failure while scanning type ......"
Doing a Google search on Microsoft.VisualStudio.Composition.PartDiscoveryException lead me to a Nuget package for Visual Studio MEF. Since I read so many posts of people have this same problem, I figured the problem was with Visual Studio and not necessarily any particular extension. So I installed this Visual Studio MEF Nuget package, restarted Visual Studio, and now the Solution Explorer is populated every time.
Nuget: https://www.nuget.org/packages/Microsoft.VisualStudio.Composition/
Deleting the .suo file worked for me.
Close VS, delete suo file of your project (is hidden), open your project again.
I had this problem with two projects, this fixed it in both cases.
Also, creating a new project (in my case a Console Application) also worked! That was probably the easiest fix i've found thus far and you don't have to delete anything! Nice...
Go To Window menu in visual studio and click reset window layout...it will work

Visual Studio 2012 Project Properties Editor is Disabled

I have problem with my visual studio. Something went wrong with my project properties and I always see everything disabled. It hapens even if I create new console application.
Any ideas? I restarted all visual studio settings, restarted computer, uninstalled extensions, searched the web but nothing helped.
I used Repair in add or remove programs and it is working fine now. Wonder what went wrong. I dont like this "it worked yesterday" problems.
The same symptom occurs while running your program in Visual Studio using the debugger.
If the project properties are greyed out, first check if you are debugging. If you are, finish debugging, then look again at the property pages.

Visual Studio 2012 Express is suddenly "incompatible with this version of Windows"?

I'm running Visual Studio Express 2012 on Windows 7. I've been running it with no problems for several months now.
Last Friday, when I shut down my PC, a lot of Windows updates were installed. This morning, when I started up and opened a VS2012 solution, I got this error message:
This program has known compatibility issues
...
Visual Studio 2012 Express for Windows Desktop is incompatible with this version of Windows.
There's a button for Run Program, and when I click it, the solution opens normally. I haven't changed anything about my Windows configuration. This happens every time I open a solution. Did MS release a flawed patch in the batch of updates that got applied last Friday?
EDIT: I'm not sure why people are voting to close this question. The answer that's been linked to isn't related to my issue; that answer seems to pertain to trying to open a VS2012 project in VS2010. I'm trying to open a VS2012 project in VS2012. If you really think that the question needs to be closed, please let me know why in the comments, so that I can change it appropriately.
The .NET updates installed on Friday were:
KB2805226
KB2805221
KB2804582
UPDATE: I gave up, more or less, and clicked the "Don't show this window again" checkbox on the error window. Visual Studio seems to be running ok.
I received the same message on Visual Studio 2012 Premium (on PC where Windows 7 re-installed in last month) - the suggested fix was "Update for Microsoft Visual Studio 2012 (KB2781514)" which seems to have fixed it
www.microsoft.com/en-us/download/details.aspx?id=36020
Install Visual Studio 2012 Update 2 solved my problem. No previous update needed for this one. Here's the descriptions of the update.
(I'm using Windows 8, installed all important updates for Windows, then tried repair Visual Studio in Programs and Features, problem still here until installed Update 2.)
I've been running VS2012 for about 2 weeks now since I clicked the "Don't show this window again" button. I haven't encountered any problems. For now I'm going to consider this an adequate solution.
I've just installed VS2012 at home and came across the same problem. The 1st solution I found is that webdeploy doesn't work after Oct 2013 and I should install Web deploy V3.0.
Done that, no joy. I let Win7 search for compatibility solution on-line and it found an update patch (KB2781514) which did work.
This is the same solution as mentioned before by #John M.
Should've looked here first, just posting this again if someone comes across this again these days..
Thanks to all other users who helped with this thread.
I had a similar problem with VS2012 awhile ago it was along the lines of:
"this solution has no errors and could potentially be damaged"
*yet still opened fine.
as far as fixing it went I performed a clean install of VS2012 and the error has not bugged me since in saying that I am probably out of date at this time and may find if I updated I would have the same issue.
Food for thought.
Even i had the same problem on Windows 7 with Visual studio 2012.
Installed Update for Microsoft Visual Studio 2012 -KB2781514 and it fixed the issue.
Note: "Just clicking on Run program was also opening up the solution file without any issues in my case."

Project dependencies not loading in Visual Studio 2012

I'm not sure if this is a add-on/extension issue but I'm having a heck of a time with Visual Studio 2012 on two computers. I believe it is DevExpress CodeRush causing the problems as it seems to work fine when I uninstall it but I'm not 100% sure.
I startup VS 2012, answer YES to the Get Latest from TFS 2012 and the solution right-click the solution node in the Solution Explorer and choose Project Dependencies... - it shows nothing checked. Of course the build will fail. I close and restart VS 2012 and then it shows. I typically do this through the course of the DevExpress option to clear the solution cache which causes the solution to reload.
Does anyone have any suggestions as to what may cause the project dependencies to get lost yet after a restart they are fine again? Is there something I need to delete and rebuild to try and resolve this?
The fix (so it seems) is to not check the option in VS source control settings to do a Get Latest when opening the solution. It seems to prevent the solution from initializing properly. I will consider reporting this to Microsoft Connect.
As I know CodeRush does not change anything in the Project Dependencies dialog. However you can write to DevExpress Support Center (http://www.devexpress.com/Support/Center) for a more detailed answer and research.
I also recommend you include a project and a video that illustrates the problem (if possible).
I was facing same issue. However got fixed after deleting .suo file from solution folder

Resources