Visual Studio 2022 Debugger thinks I changed code and wants to hot reload - asp.net-core

EDIT: Good information provided below to diagnose, but the issue was I was running Visual Studio 2022 17.3. Version 17.4 is required for .NET 7, and I had just installed that. Once I installed the latest version of VS, all my problems went away. Install with Visual Studio
Suddenly today, debugging my ASP.NET Core 6 and 7 apps suddenly has stopped working. I hit F5 to debug, it stops on my breakpoint, but as soon as I continue or step into, I'm shown this dialog:
I haven't made any changes to code, I'm simply trying to continue after I've stopped at a breakpoint. This just started happening today and I can't figure out what I did.

I haven't made any changes to code, I'm simply trying to continue
after I've stopped at a breakpoint. This just started happening today
and I can't figure out what I did.
Well, if your visual studio stop working for debugging all type of application, please check following configuration:
1. Tools > Options > Debugging > .NET/C++ Hot Reload
2. Tools > Options > Projects and Solutions > ASP.NET Core >
Furthermore, If you select the Always rebuild option in the dialog box, you won't see the dialog box again in the current Visual Studio session, and Visual Studio will automatically rebuild and reload instead of showing the dialog box.
Note:
In addition, as you can see above in the first release of Visual Studio (version 17.0) the standard Edit and Continue dialog is still shown when using Hot Reload with the debugger. This was a bug and has been resolved starting with 17.1 Preview 2 release.
If you still need more details about the issue you are having with, I would higly recommend you to check our official document here.
If issue still perist:
After checking above configuration, if your issue still persists and if you are not using Visual Studio (version 17.0) then you still reset your unknown setting in visual studio as following:
Go to Tools > Import and Export Settings.
Then No, just reset settings
Finally, restart Visual studio.
You can get more details here.

Related

VS2015 RC delay notification

Since some time i got some issue with my Visual Studio 2015 Community edition. When i am trying to debug my windows form application it's stack and when i click on visual studio window i see message
"Delay notification"
and i have to option either
"Switch To"
or
"Continue waiting"
. And it's never come back to work again i have to restart my computer to work again for some time again and then again. I am using windows 10. Do you have any clue why it happens?
Run Visual Studio's setup and click Repair. It's a long process, but works. Also, check if you have updated the Microsoft ASP.NET and Web Tools extension to the latest version.

Visual Diagnostic is either disabled or is not supported by the current application

with VS 2015 Enterprise i get always following message on a solution while debugging: XAML Visual Diagnostic is either disabled or is not supported by the current application
Tools - Options - Debugging - General:
Enable UI Debugging Tools for XAML is enabled
Preview selected elements in Live Visual Tree is enabled
I have tried:
VS Restart
Clean Solution / Rebuild
Fresh Checkout
Curious: If i start the solution without debugging and i attach the debugger to the process, it works ...
Update:
If i select "Enable native code debugging" in project settings - debug, it works !
I needed an additional debugging option to be disabled in order for the tools to work with my projects:
Tools - Options - Debugging - General:
Use Managed Compatibility Mode --> disabled
I also faced this problem for some WPF projects that came to my pc from various sources. In my case the problem was in the project target framework - it was set to .NET Framework 3.5. The Live Visual Tree and the Live Property Explorer in VS 2015 do not work with .NET 3.5:
Inspect XAML properties while debugging
https://msdn.microsoft.com/en-us/library/mt270227.aspx
So I just changed the target framework to .NET Framework 4.0 in the project properties dialog (the Application tab) to make these 'live' tools work.
I faced the save issue on VS 2019. It happened all of a sudden on a project which it used to work on. Restarting VS did not help. But it got resolved after PC restart.
If you're having that problem in VS 2017 while debugging on a remote machine, installing the Visual C++ 2017 Redistributable (x64 in my case) made UI debugging work.
I always had this VM where UI debugging worked but my colleagues couldn't get it to work on their machines until I was experimenting with something where I had to uninstall all redistributables. After finishing my experiments I realized I couldn't debug the UI anymore. I reinstalled the 2017 redistributable and the functionality got enabled again.

Visual Studio 2013 crashing when opening XAML

I have a C# WPF project I can open just fine in VS 2010 Ultimate or 2013 Ultimate.
I can edit it and run it from either.
When I double click the window.xaml, it crashes 2013.
I disabled then uninstalled my extensions. Still crashes.
I spent more than half the day uninstalling (uninstall is broken, btw) and re-installing VS 2013 Ultimate. Still crashes.
Per comment, here's a screenshot of the error:
Actually just tried to create a clean WPF project and it crashes the same way while attempting to create a new WPF project.
Always check this folder for any VS errors
%APPDATA%\Microsoft\VisualStudio\PUTYOURVSVERSIONHERE\ActivityLog.xml
If the folder doesn't exist or is empty, run Visual Studio with this command:
devenv.exe /log
There could be many reasons. This one for example was because of an outdated driver. There may be workarounds, however which one to use will depend on the error you see. Can you update your question with the error message?

Visual Studio 2012 MVC page doesn't update after refresh

In Visual Studio 2010 I can change cshtml file with the project running, save it, refresh the page in the browser and see my changes take effect. But, for some reason I can't see my changes when I refresh the page while running a Visual Studio 2012 project. I have to rerun the project to see my changes. Needless to say, it makes developing in VS 2012 impossible, because I can't test my changes out very quickly. So, unless, I can get this to work in VS 2012, I'll have to stick to VS 2010. Can anyone help me with this?
P.S I had installed Visual Studio Update 2 hoping that it would fix this issue, but it didn't get fixed
Tools->Options->Environment->Documents->
Checked first option with suboption
Detecked when file is changed...
Auto-load changes..
I hope after ctrl+f5 it works...
or maybe
Tools->Options->Projects and Solutions->Build and Run-> On Run, when projects are out of date
Choose Always Build

Unable to start debugging - Visual Studio 2012

"Unable to start debugging 'C:\Windows\System32\WWAHost.exe'. The Microsoft Visual Studio Remote Debugging Monitor (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging."
Searched for similar posts, but didn't found one. If duplicate just inform.
I am not trying to connect to any remote machine. Just testing on my local machine.
Is there any way to solve this issue. (I'm using Windows 8 Enterprise 64-bit, just a javascript project)
Problem solved. Installed Remote tools update from here and working fine. Thanks for responding. Closing the topic.
I had the same problem. I fixed it by changing properties/compile/target platform to x86 instead of Any CPU. It solved the problem in my case. Hope it helps.
This happened to me just now when I had a website set up in IIS for mydomain.com, and set my project's start up url (Local IIS) to mydomain.com, and then launched the project before remembering to add a record in the host files for the domain:
127.0.0.1 mydomain.com
This got me for a good hour before I remembered I never set the record. Adding the record fixed it right away.
Windows 7 x64, VS 2012
In my case, the Remote Debugging Monitor component was installed and the app was clearly configured to debug locally in settings. This was a WinForms app upgraded from VS 2008, .NET 3.5.
Turns out it was the Windows Firewall. By directly running:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe
A firewall dialog appeared where I could allow msvsmon.exe to run. After a VS 2012 re-start, debugging (locally) was fine!
Ensure you have Local Machine selected in this drop-down menu:
Windows 7 x64, VS 2012, VB.NET
I fixed it like this:-
Create a shortcut on your desktop to "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe".
Right-click shortcut and select "Properties" from the dropdown menu. Select the "Compatibity" tab, tick "Run this program as administrator" and click OK
Create a shortcut on your desktop to "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe".
Right-click shortcut and select "Properties" from the dropdown menu. Select the "Compatibity" tab, tick "Run this program as administrator" and click OK.
To start VS2012:-
Double-click the msvsmon shortcut icon (that you created above, to launch msvsmon). Wait for the "Visual Studio Remote Debugging Monitor (Administrator)" window to display before continuing ...
Double-click the "Visual Studio 2012 Professional" shortcut icon (that you created above, to launch VS2012)
In VS2012, ensure standard toolbar is visible.
In VS2012, ensure "Solution Platforms" dropdown (on standard toolbar) is visible and set to "x86".
and debug now works (for me anyway) ...
However after 15 minutes or so, debug may stop working and you may get the msvsmon error again. If that happens, simply close VS2012 and msvsmon and then start again (from "To start VS2012:-" above) ...
Myself and several other developers have been trying to look for a solution for this problem for about 3/4 hours as Visual Studio crashed then this error would occur (twice in 2 days). I then suddenly (after a lot of debugging and trying other suggestions and headbanging) I somehow realised that the file which was highlighted had changed and when I was trying to debug was not the MVC app project, once I changed it to my project's one it then worked.
Hope this helps and saves people from hours of pain!
I also got this error, I usually run sites under a named user (which is also a database user) and forgot to set the Application Pool. (parliament's answer also helped me)
For me this worked in VS2013:
Save your work, close Visual Studio then reopen your project
I encountered this error as well.
The cause of mine was that I had accidentally emptied out the following property
Properties->Debugging->WorkingDirectory
Changing it to:
inherit from parent or project defaults
Solved the issue.
If you are using Microsoft's Azure, try attaching manually the debugger:
I have outlined the steps in the following answer:
https://stackoverflow.com/a/35738995/1057052