visual studio 2022 cannot load any projects - Unsupported project type error - runtime-error

I was playing with some VS 2022 extension development and I ran the vsix project in debug mode with "Start external program" set to
"E:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe"
Command line was: /rootsuffix Exp
I was running it OK. I was able to see a new VS 2022 instance and I loaded a solution, closed it and open another.
When I stopped running vsix project in debug mode. I closed that project.
Then when using normal VS 2022 to open a solution with many files suddenly I could not open any project due to unsupported project type error.
Its seems the experimental flag changed something in the registry and invalidated my normal VS 2022.
I tried running:
devenv /rootsuffix Exp /updateconfiguration
and
Reset the Visual Studio 2022 Experimental Instance.lnk
It didn't help.
How can I get back my VS 2022 back?
I had a lot of extensions installed and I hope someone can help.

Related

VSCode Omnisharp server A .NET 6 SDK for x86_64 was not found

Omnisharp does not seem to recognize my installed .NET sdk (version 6.0.408).
I have tried manually adding this path via settings to Omnisharp: SDK path i.e.:
C:\Program Files\dotnet\sdk\6.0.403
I have also tried reinstalling the SDK and even VSCode.
This does not seem to solve the issue however, and I am unable to run my asp.net application on VSCode. Running dotnet run from the terminal is fine.
TLDR: Both .NET SDK versions and Visual Studion versions needed to be x64.
Here was the exact error I was seeing in the Output Window:
[ERROR] A .NET 6 SDK for x86_64 was not found. Please install the
latest x86_64 SDK from
https://dotnet.microsoft.com/en-us/download/dotnet/6.0.
[ERROR] Error: OmniSharp server load timed out. Use the
'omnisharp.projectLoadTimeout' setting to override the default delay
(one minute).
When I realized there was a mismatch between my .NET SDKs and Visual Studio Code in terms of being x86 and x64, I did the following:
Deleted the bin/obj folders and .vscode folders in my VS Code project.
Uninstalled my .NET SDKs via Windows (Setings > Apps).
Uninstalled Visual Studio Code via Windows (Setings > Apps).
Installed .NET 7.0 x64 and .NET 6.0 x64.
Opened PowerShell and ran dotnet --info to make sure my .NET runtime and SDK were appearing correctly.
Installed Visual Studio Code x64.
Used PowerShell and cd'd to my project folder. Did a dotnet restore. Then launched Visual Studio Code using code . command.
I could then use the most current version of the VS Code extension (v1.25.2).
Uninstalling and then installing the VSCode extension C# for Visual Studio Code solved the issue for me.
I had the same problem and just solved it. Copy and pasting this from a Youtube comment I just finished writing, so it might sound funny out of context, but the good bits are in there. Hope it helps.
Installed dotnet 7.0, but then it said dotnet 6 was missing...
So I deleted the script asset, exited Unity, went back to their website and installed Net 6.0.403
Error still happened.
I'll note this seemed to push a script compiling error out to Unity in the inspector window, as well.
Deleted the script asset again, exited Unity again, then uninstalled both dotnet 7 and dotnet 6.
Then I reinstalled dotnet 6.
Into unity, made a new script, opened it, and this time no error message about missing net 6.
I just started yesterday. Literally. So if my solution is trash, I'll laugh with you lol. Best of luck.

Can clean iOS project in debug. Cannot clean iOS project in Release

Visual Studio 2019 and 2022 under Windows 10. I get the following error:
Error Unable to remove directory "obj\iPhone\Release". Could not find a part of the path 'Microsoft.AppCenter.Crashes.iOS.Bindings.dll.msym'. Droid project works fine.

R Xgboost: How to compile xgboost with GPU support on windows 10; can't find Visual Studio [duplicate]

When I am trying to install CMake I get the error:
Visual Studio 15 2017 could not find any instance of Visual Studio.
I am using Windows 7 and Visual Studio 2017. The CMakeOutput.log file writes:
The system is: Windows - 6.1.7601 - AMD64
Any ideas?
I ran into the same error and performed the following steps to resolve the issue:
Open Visual Studio
Go to Tools -> Get Tools and Features
In the "Workloads" tab enable "Desktop development with C++"
Click Modify at the bottom right
These steps resulted in the "Visual C++ tools for CMake" feature being installed, but the other optional C++ features included in this workload may also helpful for what you are trying to do.
After the Visual Studio updater finishes installing try re-running the command. You may need to open a new command window.
In my case, I installed Visual Studio, selecting the workloads and modules that I wanted, but I ignored the request to reboot, assuming that shutting down the computer at the end of the day and restarting it the following day would suffice. I was wrong.
The following day I tried a cmake build and got the "could not find any instance of Visual Studio" error. After several attempts to resolve, I re-ran the installer, made no changes to the configuration, and clicked Modify. This time I let it reboot the computer. The reboot took a long time. After which my cmake build worked.
If you have already installed the workload Desktop development with C++ and still getting the following errors while using visual studio 2022 for flutter
Generator
Visual Studio 16 2019
could not find any instance of Visual Studio.
Building Windows application...
Exception: Unable to generate build files"
Solution: Follow these steps,
Edit your_flutter_path\packages\flutter_tools\lib\src\windows\build_windows.dart, and change the constant on line 28 from Visual Studio 16 2019 to Visual Studio 17 2022
Delete flutter_tools.stamp and flutter_tools.snapshot from your_flutter_path\bin\cache\
Run flutter clean in the project
I had the same issue "could not find any instance of Visual Studio"
but with Visual Studio 2019 (Community Edition) and I just had to configure the VS160COMNTOOLS variable so that CMake correctly detects Visual Studio.
export VS160COMNTOOLS="/c/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools"
(cf https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2016%202019.html)
With Visual Studio 15 2017, the variable you need should be VS150COMNTOOLS.
(cf https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2015%202017.html)
NB: in my case, in a Travis-CI workflow, I installed Visual Studio using the commands (no need to reboot):
choco install visualstudio2019community
choco install visualstudio2019-workload-nativedesktop # required
With only the first package, CMake detection of VS2019 failed.
I was configuring a Jenkins build node and could successfully run CMake GUI manually but command line use or builds using the CMake plugin would fail with:
Visual Studio 16 2019 could not find instance of Visual Studio.
-A x64 parameter was added with no change in result.
The problem was that CMake could not determine the Windows SDK version.
By adding CMAKE_SYSTEM_VERSION parameter CMake was then able to find Visual Studio.
-D CMAKE_SYSTEM_VERSION=10.0.18362.0 (use your windows SDK version)
Environment:
windows 10 system build: 19042
CMAKE 3.19.4
VS 2019 Professional 16.8.4
Jenkins 2.235.1
Full command line that worked:
"C:\Program Files\CMake\bin\cmake" -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE=Release -A x64 -D CMAKE_SYSTEM_VERSION=10.0.18362.0
When using VS 2017, be aware that this is really VS 2015, and CMake identified it as VS 2017 2022 which is not the version of VS 2017 I had, that gave me this error. So the conclusion I offer is to try different versions, specifically the 2015 one.
I had a similar issue where installing libzmq in my npm project was throwing the same error and that wasn't getting solved by enabling "msbuild" under "Desktop development with C++" in the Visual Studio installer.
My solution ended up being to reinstall the Windows build tools for npm with the following command.
npm install --global windows-build-tools
Note: Remember to run the command prompt (or whatever terminal you are using) as admin before running this.
If the CMake used to work with the installed Visual Studio and is broken someday, then the problem could be VS requires system reboot to complete some update.
For quick verification, rename HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\Setup\Reboot to like HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\Setup\Reboot.bak, then re-run cmake which should succeed. Don't forget to rename the registry back and reboot the system if this is the problem.
In my case, I was selecting different version of visual studio in that configuration dialog box whereas I installed different version.
Do select the same version.
Above solutions did not solve this issue for me. After installing node.js from https://nodejs.org/en/download/ apparently a correct version of windows-build-tools was installed
I reinstalled the Visual Studio 2019(my former one is 2017 version ) with all those settings required(my cmake version is 3.23.0),and it works. So try to install different versions.
In my case, the problem was gone after I deleted the previous cmake result directory and then ran cmake again.
if you have installed two or more Windows 10 SDK, delete them excluding latest one.
Try downloading the windows-build-tools package.
npm install --global --production windows-build-tools --vs2015
This step should be the end-all-be-all solution to fixing node-gyp problems. For most people, that’s true. NPM has a package called windows-build-tools that should automatically install everything you need to get node-gyp working, including the Microsoft build tools, compilers, Python, and everything else required to build native Node modules on Windows.

Installation of Qt 5.6.1 MSVC 2015 Update 3

I have encountered the following problem during a routine Qt 5 installation combined with Visual Studio 2015:
I did these steps:
Installed visual studio 2015 enterprise
Updated it to Update 3 (recent)
Installed X64 Debuggers And Tools-x64_en-us + 32bit
Installed Qt 5.6
I inspected the automatic detection of compiler, debuggers and the build environment comparing it to another machine, and all look OK.
Created new test projects using empty console application, Qt quick.
All fail during compilation step, with exactly 20 errors:
20 compile errors
I noted that the errors appears in code files of VC++ include path
for example in the code file xtr1common (first error in the picture).
I installed and used Qt with MSVC including MSVC Update 2 many times before but not with Update 3. What went wrong? How do I fix the problem?
Just go to windows updates and remove the visual studio update 3. This will return visual studio to original status including the C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE folder.
I hope there is a better answer than this because I needed the visual studio update 3 for other purposes than Qt. But what to do if the Qt 5.6.1 is not compatible with Visual Studio 2015 update 3. If someone have a better answer please hit me.

Qt in Visual Studio 2012, "error C1083: Cannot open include file: 'stddef.h': No such file or directory"

I errors and a warning when I try to compile some openGL projects for Qt.
Many of them are:
error C1083: Cannot open include file: 'stddef.h': No such file or directory d:\documents\code\qt5pack\qt-everywhere-opensource-src-5.0.1\qtbase\src\corelib\global\qglobal.h 46 1 01-createcontext
Using Qt and OpenGL with Visual Studio or Creator is giving me a headache. I noticed that my $VCInstallDir is to VC10.. I don't know if that is anything important.
I had this exact problem and struggled with it for a few days. My situation was this:
Had VSE 2013 installed, Qt 5.3.1 (64 bit), and OpenCV 2.4.9 (64 bit). Was working fine, building projects in QtCreator + OpenCV using the VS 2013 compiler. Then I was trying to incorporate CUDA and found that the CUDA compiler was not compatible with VS 2013 so had to downgrade to 2012. That's when the problem started. Tried repairing, uninstalling, reinstalling...nothing seemed to work. I kept reading in posts that it probably had something to do with the Microsoft Platform SDK not being installed or installed correctly. So I went to this site to download a fresh copy and noticed that down the page there was a section that described how to uninstall it, including some manual steps.
http://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx
So, here's what I did to get everything working. Maybe all these steps were not required, but this is what I did.
1) uninstall VSE 2012 (I had already gotten rid of VSE 2013), and deleted the folders C:\Program Files (x86)\Microsoft Visual Studio 11.0 and C:\Program Files (x86)\Microsoft Visual Studio 10.0 which both had some residual stuff in them after the uninstall. NOTE: Remember that VS 2012 is really Visual Studio 11.0 and VS 2010 is Visual Studio 10.0.
2) uninstall all Microsoft .NET Framework SDKs (there were a few on my machine 4.5 and 4.51)
3) uninstall all Microsoft .NET Framework Multi-Targeting Packs, which apparently is part of the SDK. Again, there were several on my machine...I guess from different versions.
4) reinstall VSE 2012
5) reinstall the Microsoft SDK. For me this was the latest version 8.1 which works for Windows 7, 8, and 8.1.
6) made sure all my kits were right in QtCreator, which they were, and it all worked again.
Hope this helps someone.
Now I can get back to re-compiling OpenCV with all the NVidia/GPU options. :-)
VS2012 should actually point to VC11...
Have you checked your projects properties? Have you installed the Windows SDK?
I am very new to building, making and configuring projects and compiling from source. I don't know what exactly was wrong, but I think it might have had to do with the VS2010 express installation I did earlier this month. I "repaired" VS2012 using the uninstaller and now it seems to work.

Resources