Visual studio 2022 hangs on Debug.Launch() - c#

Summary:
The problem is when I launch an app which has Debug.Launch() with a new instance of visual studio 2022 [17.4.3] or visual studio 2022 Preview [17.5.0 Preview 2.0] it hangs forever. Same for visual studio 2019 [16.11.22]. I originally had it in source generator [build time]. So then I tested it with a console application as well to see if I get the same result (which I do get).
Steps:
Create Console App.
Add the following lines :
#if DEBUG
if(!Debugger.IsAttached) Debugger.Launch();
#endif
Build the solution (in Debug).
Start exe from debug folder.
Try to open with new instance of visual studio 2022.
Visual studio hangs forever.
I also opened the following ticket.
Already tried the following:
Restart Pc
Deleted vs Folder
Repair Visual Studio (twice)
DISM.exe /Online /Cleanup-image /Restorehealth
sfc /scannow
Microsoft .NET Framework Repair Tool
Turn windows feature on or off => .NET Framework options turned off and back on (with restarting)
Restored pc-image to version when it was working => still fails
Copying folder to VM and installing latest Visual Studio 2022 and running it there. => Also fails

After installing an older version of visual studio (Visual Studio 2022 [17.3.6] Professional) I could open open the console.exe with Debug.Launch(). And the hanging was resolved.
Since you can't install an older community version of visual studio you need to install a professional version.
You can download it from here Microsoft release history.

Related

Open Visual Studio Project in Terminal on Mac

My Visual Studio Preview has expired and I can't seem to get a new one for my app. Is there any way I can start it from my terminal without opening Visual Studio?
You can install Visual Studio Community to continue developing in it. When you have visual studio build tools installed, you can compile and run it through the console via msbuild.

unable to start debugging. failures to process configuration file

when I want start my project in vs 2019 i see this error:
unable to start debugging.failures to process configuration file. try to start this application. if failures continue, try to repair your installation.
I tested in windows form application, console application and asp Core.
My project will be built but will not start from visual studio 2019.
I repair and update vs 2019 but also I have this error
Because Visual Studio is installed by an online installer, you will often run into problems. It is better to install Visual Studio with an authorized IP or find a full version of it without the need for online installation. You can reinstall vs
This error was due to incomplete installation of Visual Studio. Repair, update, or reinstall Visual Studio to resolve this issue.

Project could not be opened because the Visual C# 2015 compiler could not be created. Please re-install Visual Studio

I have a Windows 10 PC on which I have installed VS 2012, VS 2015, and VS 2017.
The solution was created for 2015 platform toolset. When I open the solution in VS 2017, and try to build it, it works fine.
If I open it in VS 2015, and build it, that also works.
But when I try to build it using:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" [link to .sln file] /Build "Release|Win32" /Out "build.log"
I get the error message:
Project 'URCSLogger' could not be opened because the Visual C# 2015 compiler could not be created. Please re-install Visual Studio.
I tried everything in this fix but nothing worked. Any tips?
Have you tried MsBuild.exe [Path to your solution(*.sln)] /t:Build /p:Configuration=Release;Platform=x86 ?
See MSDN documentation here: https://msdn.microsoft.com/en-us/library/ms164311.aspx
Please ensure you have Release | x86 configuration settings in your solution. See How do I specify the platform for MSBuild?
Hope this helps.

Getting the "Visual Studio Debug Engine Sample" running in Visual Studio 2017?

I'm trying to get the Visual Studio Debug Engine Sample running in 2017 Professional.
When I'm debugging according to the Walkthrough1.docx I can't see the Tools->Project Launcher menu.
The ProjectLauncherPackage doesn't seem to be loaded since my breakpoints is whited out.
This is what I did to make it work so far:
Updated the Windows SDK Version in the SampleEngineWorker;
Added
DiaStackWalkHelper::numberOfFunctionFragmentsForVA
DiaStackWalkHelper::functionFragmentsForVA
SymbolEngine::NumberOfFunctionFragmentsForVA
SymbolEngine::FunctionFragmentsForVA
Changed SampleEngine and ProjectLauncher to be x86
Updated source.extension.vsixmanifest
Install targets to 15,16
Dependencies to Visual Studio MPF 15.0
Added Microsoft.VisualStudio.Shell.Framework version 15 from nuget.

Cant find Visual Studio Installer Projects on Visual Studio 2013

After finishing my C# application I had to make an installer. After seeing that the default installer projects are gone, i searched for a replacement.
I found the Visual Studio Installer Projects. I downloaded the file from here: https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d.
When i restarted Visual Studio, opened my project, clicked "add new project" and here is what I got:
Problem is that I cant find the setup project. I have tried repairing the install. I restarted Visual Studio several times.
My Question:
How can I find the installer project and why it's not working for me.
If I cant make it work, are there any alternatives ? (except InstallShield)
Additional info:
Visual Studio 2013 Community with update 4
Windows 8.1 64-bit
You could try Tools > Extensions and Updates and search for it:
Visual Studio setup projects no longer ship with Visual Studio
However, you can download them here.
Or use a third party library like WiX.
I had the same problem and it turns out that visual studio removed the support for installer projects in 2010.
but still you can download and install it in your version
VS2013
VS2015
VS2017

Categories