Visual Studio 2010 crashes at successful build - c++

Upon building my C++ projects vs2010 crashes even though the process was successful, I tried updating to Sp1 to see if that would fix the problem. But was stopped by some errors on installation. I tried to re-install, safemode, I had some addins about 3, AnkHSVN and two basic other and deleted them but experienced the same problem.
Specs:
OS: windows 7 64
VS: 2010 U

Found a solution.
To fix: click start, type "cmd" into the search box, right click "cmd.exe" in the search results, select "run as admin", then run this command: regsvr32 "C:\Program Files (x86)\Internet Explorer\ieproxy.dll"
Reference: http://connect.microsoft.com/VisualStudio/feedback/details/533194/crash-while-compile-an-extremely-simple-c-project
If that doesn't work, AnkHSVN is known to cause the same problem. You said you uninstalled it, but you may want to check out this page: http://blogs.msdn.com/b/visualstudio/archive/2010/05/11/if-you-are-seeing-intermittent-crashes-with-vs-2010.aspx

As a test, get out of visual studio. Rename the .suo file in your solution directory. Go back into visual studio and rebuild all.

Related

I just installed visual studio and ran into some errors specifically The WindowsSDKDir property is not defined. Some build tools may not be found

Just installed visual studio 2019 on windows 10, was using visual studio for the first time and ran into the following error, It's a basic hello world console program that I tried to run.
error C1083: Cannot open include file: 'corecrt.h': No such file or directory
1>Done building project "ConsoleApplication2.vcxproj" -- FAILED.
Severity Code Description Project File Line Suppression State
Warning MSB8003 The WindowsSDKDir property is not defined. Some build tools may not be found. ConsoleApplication2 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets 434
I tried searching for this error over YouTube and of course here, and also Microsoft's offical forum but couldn't find anything.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!\n";
}
the code looks just fine.
I ran into the same issue today. It turns out I didn't check the Win10SDK to save disk space while installation.
Solution:
In VS, go Tools menu=>Get Tools and Features=>install the Windows 10 SDK(10.XX.XX.XX)
Once installed, launch VS and open your project, right-click your project(NOT Solution)->properties->General->Windows SDK Version, check the value should be 10.0 instead of blank.
Then the compiling just worked.
I've got the same issue and turned out that I haven't installed Windows SDK. It can be done by typing "Install Windows SDK" into visual studio's search prompt
I had same problem when I installed Visual Studio 2019 on Windows7 and opened project created in Visual Studio 2017 (witch wasn't installed on that machine).
To solve the problem I went to project Properties -> General -> Windows SDK Version
And changed it from 10 to 8.1.
I fixed this issue by repairing Windows SDK. Now it's working as expected.
Steps:
Go to Settings>Apps & Features.
Click on Windows Software Development Kit - Windows 10.0.18362.1
(Note: Version number might be different for you)
Click on Modify.
Select Repair from options.
Click Next.
Restart VS and try running your project.
I was just having thesame issue so I figured maybe the headers were in a different directory than where the program is searching. When I went looking for tge header files none existed. So the problem is probably with iostream not existing.

The setup for this installation of visual studio is not complete, really?

I have been using Vs 2017 for several months on dev machine. This fine morning says setup incomplete. Am I missing something?
In this case you need to go to Control Panel => Programs and Features and choose Visual Studio and update it.
VS 2017 (15.6.6) was fine for me on Friday 6/1/18 on Windows 10, but same issue as OP today after a restart.
As suggested by the dialog and Retired Ninja, I ran the Visual Studio Installer (to 15.7.3 after updating VS Installer) and that fixed it.
Note that the 15.7.3 update was a 7.73 GB download. Your download size may vary.
This has happened to me for the last 3 upgrades in Visual Studio Enterprise 2017 (now again on upgrade to 15.9.21).
The fastest fix (and I'm not sure why) is simple and doesn't bomb your settings or take for ever.
In the Visual Studio Installer, click on Modify.
Click "Modify" on the bottom right corner.
Yes it says "Total space required 0 KB".
Yes you didn't really change anything.
It will then act like it is downloading something. (not sure what)
It will then act like it is installing something. (again, not sure what)
Open Visual Studio 2017 and it works.
Hope this helps.
If you have an offline installation like me and can't simply re-run the Visual Studio Installer you can edit devenv.isolation.ini and change the last line to read SetupFinished=true. It will detect your trickery and complain, but at least it will launch again.
Edit: I ended up getting the Visual Studio Installer to fix the issue after choosing the "Download then Install" option. Maybe I was too impatient when I initially stopped the update? My above answer is useful when you need to get work done that isn't affected by the broken features, but you will likely encounter problems later on.
just had the same problem (without any reason with) vs 2019 prof, after googling and reading on that topic, just went to vsix, looked for some individual component to install/uninstall, randomly picked cloud explorer, uninstalled it and some dependent components and VS 2019 prof started normally
decided to leave this here. may be it helps somebody
Solved: I did following steps, run the visual studio and it works for me.
In my case visual studio was working fine , I just restarted the PC, this popup was keep coming when I try to open visual studio.(in my case I was using VS 2019)
Go to this path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE"
Open devenv.isolation.ini, set SetupFinished=true and save.
Now open visual studio.
Cheers!
In my case did following steps:
Clear temp files (you can %temp% in run command and Shift+Delete files)
Restart your computer
Open visual studio it will work properly.
Update: Faced problem again after couple of days, This time I go to C:\Program Files (x86)\Microsoft Visual Studio\Installer.
Click on retry.
Select one more feature which I had already installed on my Visual Studio
Click on modified and after installation it worked again.
This happened to me after I canceled a plugin update.
I solved by going to this site that has the latest update of Visual Studio.
https://learn.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes
I downloaded and upgraded it.
After that, Visual Studio worked.
If your VS is already upgraded, thereĀ“s an option to "repair" on the installer.
For this problem, goto uninstall screen in control panel right-click visual studio and select option change, Installer page will open now, In that window without changing anything click modify. it will solve the problem. I'm using VS Professional 2017
I got the same error today morning. This is what I did:
I ran the visual studio installer then I clicked on Modify.
The installer was showing 0KB Required. I continued and then it downloaded and installed. (Not sure what).
After that installation, it was able to launch.
I hope it works for you as well.
I was using Vs 2019 professional 16.6 and happened to me this issue one morning. I modified the installation by adding Azure Development tools even though I was not using it. This fixed the issue.
I just updated to 15.9.24 and I got this yet again, as I have my resolution above, and Visual Studio 2019 seems to be a lot better with avoid this issue. The installer for 2019 you do have to change something and do the modification, 2017 you don't have to change anything.
I reported this issue through Developer Community:
Setup not complete since 15.9.21
I don't know why but sometimes its buggy
it's up to date but after launch visual studio this error prompted !
you have to click modify in vs installer and just modify it.
its not going to download anything.
after a moment launch vs and enjoy :)
For VS2022, WIN11:
Control Panel > Programs > Programs and Features > Microsoft Visual Studio Installer
Then, click on Change and resume the previous process.

Visual Studio 2015: Build successful but debugging never stops loading

I have this C++ project I am trying to debug in Visual Studio (Community) 2015. The build is always successful, but after that debugging never starts. All that shows up is the Windows loading icon, which just never goes away. Any ideas about what might be wrong?
The problem was that Avast was interfering with my Visual Studio Projects. I used the instructions at https://forum.avast.com/index.php?topic=139935.0 to get it to work.
Basically you need to exclude your VS projects from Avast's scan.
... but simply turning off DeepScreen in Avast 2014 is not enough. I
make multiple apps in Visual STudio 2012, and I can tell you that even
with Deep Screen off, Avast will still pop right up and destroy the
compiling process by saying the .exe is a virus (the crazy "evo-gen
[susp]"). The only way I can get Avast to stop doing that is to
manually enter-in exclusion directories for every directory where I
create apps! ...or make an exclusion for some high-level folder.
Try resetting your settings by going here
Tools >> Import and Export Settings Wizard >> Reset all settings
I had similar problems for Visual Studio 2015 Update 1 on Windows 10.
For me, the only solution, which helped is to install this package:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=49029
"FIX: Devenv.com process freezes after you execute devenv.com /build command in Visual Studio 2015 " https://support.microsoft.com/en-us/kb/3092422

Unable to start VS2012 Profiler

I'm trying to start a performance profiling session in Visual Studio 2012 RTM on Windows 8 PRO 64-bit for a console program (ANALYZE / Start Performance Analysis).
I get a popup message informing me
Could not load file or assembly 'Microsoft.VisualStudio.PerformanceTools.CounterInfo.dll' or one of its dependencies. The Specified module could not be found.
Apparently this can happen under VS2010 after KB2645410 is installed. I carefully followed the procedure given for this issue with the same error message:
Visual Studio 2010 SP1, KB2645410 and Add-Ins
However, that does not resolve the issue.
I have tried running VS2012 as Administrator as well.
How can I get the profiler working?
UPDATE
I can actually attach to a running instance of the project from the command line using the steps here:
Walkthrough: Command-Line Profiling Using Sampling
However, Visual Studio does not open the resulting .vspx file (it just does nothing after I open it with File / Open File).
UPDATE 2
Fuslogvw reports two binding errors when I attempt to start the profiler:
VS 2012 Profiler Binding Errors - Pastebin
Adding the following to the system path resolved the issue for me permanently.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools
Some other answers may be appropriate to other situations.
Note that you probably will need to run Visual Studio as Administrator for profiling to work correctly.
I also struggled with that issue.
I found a working solution for me:
I opende the XXX.sln file using notepad.
There i found several parts in the Project and Global Section looking something like this:
ProjectSection(SolutionItems) = preProject
Performance1.psess = Performance1.psess
EndProjectSection
I removed all of them and that made my Analyzer work again.
I delete the .suo file and everythings works correctly now.
The same question exists here:
http://social.msdn.microsoft.com/Forums/en-US/a6487155-980c-4bc8-82de-2fe588fdf37f/windows-update-kb2645410-and-performance-tools-error
The following are suggested workarounds:
Remove windows update KB2645410
Only run one instance of Visual Studio
If you are the administrator on your development PC you can add the permission to Everyone to read and execute all the content in the folder "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Performance Tools" and subfolders/files.
"I backed everything up and did a complete repair of Visual Studio using the original disk from Microsoft. That allowed the computer to shut down normally. Then I tried the patch again. It hung again, but after a few reboots we got a message about deleting corrupt files and finally everything seems OK."
My issue was resolved when I realized that my user access control was set too high. Once that was turned off, I rebooted and it all worked great.
Once I uninstalled re-sharper my issue was resolved.

Intellisense auto-complete is causing VC++ in Visual Studio 2005 SP1 to crash

UPDATE1: I have reinstalled Visual Studio and I am still having this problem. My guess is there is a problem with my environment.
Update2: Diving in.
I attached windbg to devenv and set a breakpoint in windbg for msenv!_tailMerge_WINMM_dll and traced through.
This is trying to load winmm.dll using the LoadLibrary API. I can see that LoadLibrary is failing and GetLastError is returning 5 which is "access denied".
now, why would vs be denied access to winmm.dll?
---Begin Original---
I am currently having a serious issue with Visual Studio 2005 SP1 Intellisense in C++. I have an all native solution with on project. Whenever I, or the editor, attempt to invoke intellisense auto-complete pow, Visual Studio crashes. I even tried this with a brand new console app. Ctrl + Space in the empty main and Visual Studio crashes.
I googled for help on this but to no avail. I have tried deleting the ncb file but no luck on that front either.
I am currently working with Intellisense turned off as shown in this article:
Visual Studio 2005 - 'Updating IntelliSense' hang-up
And I have no crashes, but it sure would be nice to have intellisense back
Call stack from a crash dump.
7c812a6b kernel32!RaiseException+0x53
502717a6 msenv!__delayLoadHelper2+0x139
50675186 msenv!_tailMerge_WINMM_dll+0xd
505ac3c3 msenv!CTextViewIntellisenseHost::UpdateCompletionStatus+0x1a7
505acb50 msenv!CEditView::UpdateCompletionStatus+0x30
505dcfad msenv!CEditView::CViewInterfaceWrapper::UpdateCompletionStatus+0x2a
02ae47fc vcpkg!CCompletionList::DoCompletion+0x444
02ade2ce vcpkg!CAutoComplete::PostProcess+0x240
02ade07f vcpkg!CAutoComplete::OnACParseDone+0x3e
02adac2d vcpkg!CMemberListWorkItem::OnCompleted+0x9d
029eb4e3 vcpkg!CWorkItem::ProcessPendingWorkItemCompletedCalls+0x117
029f8b4f vcpkg!CParserManager::OnIdle+0x183
0299961a vcpkg!CVCPackage::OnIdle+0x48
5014b288 msenv!ATL::CComAggObject<CTextBuffer>::QueryInterface+0x43
5a9d2394 VCProject!ATL::CComPtr<IOleInPlaceFrame>::~CComPtr<IOleInPlaceFrame>+0x24
5a9d2880 VCProject!ATL::CComObject<CVCArchy>::Release+0x10
774fd420 ole32!CRetailMalloc_GetSize+0x21
5009422b msenv!CMsoCMHandler::FContinueIdle+0x23
5009422b msenv!CMsoCMHandler::FContinueIdle+0x23
I would try the following set of steps to try and fix the problem
Reset All Settings: Tools -> Import / Export Settings -> Reset All Settings
Delete HKCU:\Software\Micosoft\VisualStudio\9.0 and then restart VS
Repair the VS installation through Add Remove Programs
Disable all 3rd party plugins
Did you try repairing the Visual C++ installation?
Do you have any plugins installed? Try disabling them.
It might be worth it to delete the .ncb file in the project directory, in case it was corrupted (.ncb is the intellisense database file).
If you're doing C++ development for a living (or at least doing serious development), there's no reason not to use Visual Assist.
What a bizarre problem.
I finally figured it out using procmon from sysinternals:
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
My sounds were somehow changed to windows default sounds after a recent trip to IT. This caused visual studio to play a clicking sound when intellisense happens. In order to play this sound winmm.dll must be loaded up, which is located c:\windows\system32\winmm.dll.
I suppose through debugging foray winmm.dll symbols were downloaded to a FOLDER called C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\winmm.dll. Of course this folder looked mighty tasty to Visual Studio, so when it tried to load the winmm.dll folder as a dll file POW!!!
I deleted the folder, and some other .dll folders :) and all is well.
Thanks for your help.
Make sure you are up on your service packs, I think VS 2005 is at SP1.
Try "cleaning" the solution, i.e. delete (rename) all temporary files like *.ncb, *.suo etc that have been created by Visual Studio. One of these files might have got corrupted (Your problem sounds like the IntelliSense database is broken).