Visual Studio 2012 doesn't load any project - c++

So, I'm kinda new into this VS world. I'm using VS 2012 and it was everything working correctly last time. Now I try to open my projects and none of them actually loads. When I go to the solution explorer I just see the message "Load failed" followed by the message: "The project requires user input. Reload for more information." But when I reload, it pops up a message "The operation could not be completed. There is no support for this interface."
I don't know what it means by "requires user input", i never opened my project with any input, I just click on the project's file and open it...
Anyway, what is going on??
Thanks.

I got the same message (using VS 2013) opening a project located on a network drive.
I Right clicked the project in Solution Explorer and selected 'Reload Project', a dialog appeared warning me about an untrusted location, I clicked OK and the project loaded successfully.

Change the folder name of your project. Then VS asks again if it is trustable. than click YES. after that VS reloads the project

I had to "repair" Visual Studio Express 2012 on my Windows 10.0 Laptop. You get the repair option if you already have Visual Studio installed.
This fixed my issue which was exactly like above.

I removed the ComponentModelCache folder and restarted Visual Studio 2012.
This solved the issue for me.
C:\Users\username\AppData\Local\Microsoft\VisualStudio\11.0\ComponentModelCache

This worked for me as well. I removed the contents of the folder, ComponentModelCache, then I restarted 2012 and the projects loaded without issue.

Related

Visual studio compiling failed without any errors [duplicate]

I have a WebApplication which contains reference to WCF services.
While building using Visual Studio 2010, Build fails without any error or warning. However building the .csproj using MsBuild is successful.
Can't figure out what should I try in Visual Studio, to resolve / diagnose the issue. Can you please help out?
I find out that the build has been failing,
From text displayed in status Bar.
From output window:
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
The output tab includes configuration details.
------ Build started: Project: <projectName here> Configuration: Debug Any CPU
I noticed that if "Build + Intellisense" is selected in the Error List, it causes the error messages to be swallowed.
Change this option to "Build Only", and all error messages will be displayed:
I don't know if this is a bug in Visual Studio or what, but it certainly revealed hidden error messages that were the key to pinpointing the failure for me.
Some, like Richard J Foster, have suggested increasing the "MSBuild project build output verbosity" setting to "Diagnostic" (the highest possible option), but this didn't solve the problem for me, as Visual Studio appeared to be suppressing the error message(s) themselves.
As an alternative, you may try to use the raw output messages from the "Output" tab, which haven't been filtered by Visual Studio. Either do an in-place search for the strings "error" and/or "failed", or copy all of the output to your favorite text editor and do a search there.
To ensure that the Output window appears each time you do a build, you can go to Tools → Options → Projects and Solutions → General, and ensure that the option "Show Output Window when build starts" is checked.
As an additional troubleshooting step, it is also possible to build the project from the PowerShell command line by running dotnet build. This will show you the complete build output, including any errors that Visual Studio may be hiding.
I just ran into a similar situation. In my case, a custom action (from the MSBuildVersioning package available on Nuget.org - http://www.nuget.org/packages/MSBuildVersioning/) which appeared in the csproj file's BeforeBuild target was failing without triggering any error message in the normal place.
I was able to determine this by setting the "MSBuild project build output verbosity" (in the latest Visual Studio's Tools tab [Path: Tools > Options > Build and Run]) to "Diagnostic" as shown below. This then showed that the custom action (in my case HgVersionFile) was what had failed.
Here are some things that you can try:
If your solution contains more than one project, try building each project one at a time. (You may even want to try opening each project independently of the solution.)
If applicable, ensure that all of your projects (including dependencies and tests) target the same version of the .NET Framework. (Thanks to user764754 for this suggestion!)
Tip: Check Tools → Extension and Updates to ensure that your packages are up-to-date.
Ensure that all dependency projects are built to target the same platform as your main project.
Try restarting Visual Studio.
As suggested by Bill Yang, try running Visual Studio as Administrator, if you aren't already. (If you are already running Visual Studio as Administrator, perhaps try the opposite?)
Try restarting your computer.
Try "Rebuild All".
Run "Clean Solution", then remove your *vspscc* and *vssscc* files, restart Visual Studio, and then "Rebuild All".
As suggested by Andy, close Visual Studio, delete the .suo file, and restart Visual Studio.
As suggested by Arun Prasad E S, close Visual Studio, delete the .vs folder in your solution directory, and then re-open Visual Studio. (This folder is auto-generated by Visual Studio and contains cache, configuration settings, and more. More details can be found in these questions: Visual Studio - Deleting .vs folder and https://stackoverflow.com/q/48897191.)
As suggested by MrMalith, close Visual Studio, delete the obj folder in your solution directory, clear your temporary folder, and then re-open Visual Studio.
Delete the hidden .vs folder & restart Visual Studio. That worked for me.
I want to expand on Sasse's answer. I had to target the correct version of .NET to resolve the problem.
One project was giving me an error:
"The type or namespace name 'SomeNamespace' does not exist in the namespace 'BeforeSomeNamespace' (are you missing an assembly reference?)".
There was no error in the Error List window but the assembly had a yellow warning sign under "References".
I then saw that the referencing project targeted 4.5.1 and the referenced project 4.6.1. Changing 4.6.1 to 4.5.1 allowed the overall build to succeed.
Nothing was working for me so I deleted the .suo file, restarted VS, cleaned the projected, and then the build would work.
I tried many things like restarting Visual Studio, cleaning and rebuilding the solution, restarting the PC, etc., but none of them worked for me. I was finally able to solve the problem by doing the following:
First of all, make sure all the projects in your solution (including tests) are targeting the same .NET version. Then:
Save pending changes in the project and close Visual Studio
Find the exact location from file explorer and find "obj" file and open it,
Then, delete all the included files (some files won't remove, it doesn't matter, just skip them).
Use run command (by pressing Windows Key + R) and type "%temp%" and press enter to find temporary files.
Finally, delete them all.
On other possibility is that Visual Studio needs to run as Administrator, this might be related to deploying to local IIS server or other deployment need.
Just for the sake of completion and maybe helping someone encountering the same error again in the future, I was using Mahapps metro interface and changed the XAML of one window, but forgot to change the partial class in the code-behind. In that case, the build failed without an error or warning, and I was able to find it out by increasing the verbosity of the output from the settings:
In my case (VS 2019 v16.11.20), disabling Text Editor->C#->Advanced->Enable 'pull' diagnostics in the options solved the issue.
Double check for _underscore.aspx pages in your project.
I had a page and code-behind:
`myPage.aspx` and `myPage.aspx.vb`
when building the project, I'd get errors on the .aspx.vb page stating that properties defined on the .aspx page didn't exist, even though the page itself would build fine and there were NO OTHER ERRORS showing in the output (even with diagnostic level build output).
I then came across a page in the project that was named the same thing but with an underscore: _myPage.aspx - not sure where it came from, I deleted it, and the solution built fine.

Visual Studio 2017, Intellisense is not working

I just upgraded from VS2015 to 2017, and intellisense highlighting of syntax errors has disappeared completely.
I tried some suggestions found online, mainly Edit->Intellisense->Refresh Local Cache, but that option is not there anymore.
Under Edit->Intellisense there is only Quick info which does nothing when I press it, and toggle completion mode which is greyed out
I'm using Windows 10, C++ project.
Do I need to delete some old files from VS2015 in order for intellisense to work again? like the VC.db file?
Thanks
When IntelliSense stopped working in some files, I just deleted the project cache, restarted Visual Studio and opened the project again. Bear in mind that some minor settings also get reset (like the selected architecture).
Step by step
View => Solution Explorer (in case it isn't already open)
Right click "Solution 'Project name'"
Click "Open Folder in File Explorer"
Close Visual Studio
Show hidden folders (Win10 How-to)
Delete folder ".vs"
Open Visual Studio and project (wait a few seconds)
Hope this helps. -Minding
If you encounter a file in which the intellisense or error list is not functioning properly, look at the top-left corner of the navigation bar and check to see if that file is marked as “Miscellaneous Files”
If it is, the steps to solve the issue is:
Go to the file inside Solution Explorer.
Right-Click file and select Exclude From Project.
Right-Click your project/folder where the file was and click Add Existing Item, and add the file you just removed back into your project.
This should fix whatever issues you're having. (Tip: You can multi-select source/header files, so this does not need to be done one at a time).
Right-click on solution and select Rescan Solution (Visual Studio 2017). This should re-sync IntelliSense with solution data.
Please try to click Tools->Text Editor->C/C+±>Advanced, under IntelliSense, set
Member List Commit Aggressive to True and recheck this issue. Also, set
Use Aggressive Member list for Auto Member list to *False.
In my case, the project was referring to 2 different versions of the same library. I uninstalled one of the versions and intellisense started working.

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 2017 Solution Explorer is empty

When I open an existing VS2015 solution file in VS2017, Solution Explorer is empty. I've tried to close and reopen Visual Studio several times, but the same thing happens every time. How to fix this?
This should fix it:
Close Visual Studio
Open Developer Command Prompt for VS 2017 (from Windows start menu)
Run devenv /updateconfiguration
Reopen Visual Studio
I'm experiencing the same issue. VS goes through all the steps when loading a solution, including "Preparing Solution", but then the Solution Explorer just comes up empty. So far I haven't found a solution. I tried deleting .suo files, and I tried cleaning the solution.
Like Eivind, I need to open the solution from the file menu. Fortunately, that has always worked for me so far.
Today's update for VS2017 fixed it for me. Also see https://developercommunity.visualstudio.com/content/problem/24529/solution-doesnt-open-in-vs-2017.html
I faced this type of issue when opening project on visual studio 2017.
If you have connected with TFS and I believed that your connection has been lost.
Re-connect and close the project and then reopen using visual studio.
Hope this will helpfull!
On the Notification Area there is a message for Visual Studio 2017 updates. Click on that and this fixed my problem of empty Solution Explorer when u click on a 2015 sln file.

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).