Visual Studio 2022 Edit and Continue Core 6 - Not Working - visual-studio-debugging

I can't find any rhyme or reason to this issue, other than Edit and Continue is causing delays regularly.
Sure fire way to break it is to edit and continue (!): make a change in a function (.cs file) while stepping through. This will cause a delay of anywhere between 10 to 30 seconds.
Once it does apply the code change, all subsequent F10 (step) have a long delay, freezing Visual Studio in many cases. This also occurs if you F5 and then break again into the function, even though the changes have been applied. This renders it unusable and requires stopping and starting the project.
Our solution is all .Net Core 6, there are 96 projects. I wouldn't consider that particularly large as most of the time I'm running only one of the 6 websites. It all ran fine when it was .Net Framework. Editing and Continuing worked superbly in Visual Studio 2022 when targeting that framework, from the time I started using it at RC.
I have disabled ReSharper to no avail.
I have disabled all virus protection no change.
I can only suspect that it is finding some file changes outside of it's remit.
If anyone has experience with this issue or any other suggestions I'd love to hear them.

Related

Visual Studio hangs when adding forms or opening designer

I have a major problem with a Winforms application with a large number of projects. VS 2019 threw an exception and closed a few days ago, and on reopening restored two files since then I have been unable to:
Add a new form to the vast majority of projects, whether the most basic MS template or not
Open the designer for any form that is already in the vast majority of projects
Access the navigation bars (the three combo boxes at the top of the VS work area that normally contain the project, namespace and content information) on any class referencing to WinForms in the vast majority of projects
When trying to do either of the first two things an 'Opening File' message is shown endlessly. If you try to do anything, a notification is shown that Visual Studio is busy, and that Microsoft will be notified but nothing else happens and you can only get out by using the Task Manager to kill all VS tasks.
In the case of the third one, a message is shown saying 'Refreshing Navigation Bars' but again it goes on forever. However, in this case you can click the Cancel button to cancel the loading attempt.
The navigation bars issue I believe is Resharper related. In addition CodeLens is not working at all, so the space for the number of references is generated but there is no content. This is true for ALL files in the solution, not just the form related ones.
Here is what I have tried so far:
Cleaned and Rebuilt the solution - works fine but no difference
Built and deployed the solution - works fine
Deleted the SUO file and reset
Cleared the Resharper caches
Disabled Resharper
Performed a repair install of Visual Studio
Created a new Solution and added forms etc. which was unaffected and worked fine
Opened a different solution which was also working fine
Tried the same processes with a Project in the same solution that is not part of the application (TestBed) and that works fine too, but is the only project that does
Can anyone suggest where to look now? Since new and existing solutions work OK except for this one I am assuming that it is something Solution related rather than something related to VS itself, but I have no idea what that might be. For example, what is it trying to do when it says 'Opening File' (apart from the obvious - opening a file :-)) and what could cause that to fail? Am I looking for something in the Solution file, or could it be something else?
All suggestions and assistance towards resolving this issue would be gratefully received.
Thanks to Jasimov for the only response, I appreciate your attempt to help.
I have now resolved the issue using the following steps:
Uninstall Visual Studio 2019 Community Edition
Perform a fresh install of Visual Studio 2019 Professional
Reload the main solution
Clean the solution
Rebuild the solution
Deal with some issues that were highlighted in the Output and Errors, none of which were directly forms related
Rebuild the solution
Run the application and ensure it runs as expected
Go back and select forms at random and try opening them. All now work as expected.
In addition CodeLens is now working not only properly but actually better than before giving more information more quickly. On the other hand, I have not yet reinstalled Resharper which will be the next step.
I have included all the steps I took just in case anyone else has a similar problem. I have not been able to find this exact issue anywhere else in my searches so I hope it helps someone.
UPDATE: I have since re-installed Resharper with no problems and the designers are all working fine so now back into full flow!
I had a similar issue with the web forms designer in VS2019 hanging as soon as I clicked on anything on the design surface. The same projects were OK in VS2017. Uninstalled VS2019, rebooted, reinstalled VS2019, found that the designer was now working OK. Progressively added back 3rd party toolbox components, one VSIX, and the .Net 4.8 targeting pack. Still working. Thanks for your hint about the reinstall.

WPF App runs slow only on my laptop

We have a team of about 5 developers that all work on the same wpf application. The app seems to run perfect and fast on everyones computer except mine. BTW we all have the same laptop with the same specs. I have looked at the processes running and can't seem to see anything out the ordinary. I have worked on this problem for days now and have spent hours trying to figure out why I'm having this problem. The app just seems to be very slow and choppy and is not smooth at all on my computer.
App Consist of:
EntityFramework 5.0
C# WPF / Telerik Controls
The other day I tried going into visual studio options and disabling JustMyCode and right after that, the app all of sudden worked perfect and fast. But the next time I ran it it was back to running slow again. Also I am the only one out of the developers who gets this error message in the output window:
System.Windows.Media.Animation Warning: 6 : Unable to perform action because the specified Storyboard was never applied to this object for interactive control.; Action='Stop'; Storyboard='System.Windows.Media.Animation.Storyboard'; Storyboard.HashCode='12079142'; Storyboard.Type='System.Windows.Media.Animation.Storyboard'; TargetElement='System.Windows.Media.Animation.Storyboard'; TargetElement.HashCode='12079142'; TargetElement.Type='System.Windows.Media.Animation.Storyboard'
I honestly don't know what else to try. Seems like I tried everything. No one else in the office knows. I've even gone as far as reeinstalling visual studio 2012. Any tips or advice on what could possibly happening is much appreciated.

WPF fake/ghost design time error

I have a strange behavior in VS2008 a few times: After some changes in a xaml file, removing a control with a compile time error, VS2008 keeps saying the error is still there, even when the control itself is not there anymore. I could only fix it by creating a new xaml file, copying the content and deleting the original file. I cleaned the solution, rebuild, restarted VS, restarted the computer and nothing exorcise this ghost error. The solution builds and runs successfully, but I can't see the design time editor.
Does anyone have faced this strange behavior before?
It would be really nice if I could find an easier way to workaround/avoid it.
I'm sure this is not the answer you want, but you'll experience much greater WPF development performance if you can upgrade to VS2010. VS has improved so much it's almost listless. Plus if you try to run your app with 2010 and still have the same issue, there's another whole group of devs who could try to reproduce the error.

Silverlight 4 seems like starving of memory

I have been playing a bit with Silverlight and try to port my Silverlight 3.0 application to Silverlight 4.0.
My application loads different XAP files and upon a user request create an instance of a Xaml user control and adds it to the main container, in a sort of MEF approach in order I can have an extensible and pluggable application.
The application is pretty huge and to keep acceptable the performances and the initial loading I have built up some helper classes to load in the background all pages and user controls that might be used later on.
On Silverlight 3.0 everything was running smoothly without any problem so far.
Switching to SL 4.0 I have noticed that when the process approaches to create the instances of the user controls the layout freezes unexpectedly for a minute and sometimes for more. Looking at the task manager the memory usage of IE jumps from 50MB to 400MB and sometimes up to 1.5 GB.
If the process won't take that much the layout is rendered properly even though the memory usage is still extremely high. Otherwise everything crashes due to out of memory exception.
Running the same application compiled in SL3, the memory used is about 200MB when all the usercontrols are loaded. Time spent to load the application in SL3 is about 10 seconds, while it takes up to 3 mins in SL4 There are no transparencies, no opacities set, no effects and animations in the layout.
User controls are instantied on the fly and added or removed in the visual tree on purpose when the user switches from one screen to another. The resources are all cleaned properly when a usercontrol is removed from the visual tree to allow the GC to operate in the background.
I may do something wrong but I could not figure out where exactly nail out the source of this problem. As far as I know there is no memory profiler in SL4 that can help me out to find where to look at. But again I could not be updated on new debugging tools available.
UPDATE:
Silverlight 4 Service Release to fix Memory Leaks: http://timheuer.com/blog/archive/2010/09/01/silverlight-service-release-september-2010-gdr1.aspx
Silverlight 4 has known memory leaks and the fix is currently being tested.
Here is a Microsoft Thread about it:
The user "heuertk" is a Microsoft Silverlight Developer....he explains the issues and the status of the fix...
http://forums.silverlight.net/forums/t/171739.aspx
To be honest despite your assertion "The resources are all cleaned properly when a usercontrol is removed from the visual tree" this where I'd start looking. It really does smell of elements of UserControls not being released properly.
This typically occurs when there are long lived (for example static) objects that raise events that more transient objects attach to. If these event handlers aren't detached it leaves these objects hanging around in memory.
I am keep testing and would like to share what I discovered so far.
It might be helpful to understand the behaviors of SL4.
Since it sounded pretty weird the UIThread can take so long to render a bunch of graphic components and considering Microsoft has improved the render pipeline, I have reverted my solution to SL3 but I have kept SL4 installed on my localhost.
The application uses RIA Services and moving back and forth to SL4 means that I have to do some changes in the code as per released documentation.
The application runs extremely smooth more than it was if it is tested with Visual Studio 2008. The memory usage is lower than it was before when SL4 wasn't installed.
As soon as I switch to VS2010 it is a completely different scenario. Memory grows undefinitely, the layout is slow to catch the user interaction and sometimes it freezes as before explained.
I have disabled RIA Services, by using standard Rest service and the process hasn't changed in quality.
In conclusion, considering I will keep testing in order I can finally understand what is really preventing to get the application running in an acceptable mode, I believe the memory issue is due to the debug process of VS 2010 or a combination of VS 2010 and SL4
Just for your info: there is a memory leak when using Silverlight Toolkit Charts in Silverlight 4.0. This is a known bug and Microsoft is working on it.
Silverlight 4 is Leaking everywhere. It Doesn't release memory properly.

WPF Application Hang

I'm using Windows 7 Professional (x64) and having installed .NET 4.0 RTM on my machine.
Since 2 days I'm noticing that every WPF application that I'm trying to run hangs and becomes non responsive (a not responding text is appended to it's title bar) and it's painted white.
There is no info regarding any exception, no error message. Nothing. Even the Event Log shows that there was "application hang" event (code 1002) and nothing more.
This problem is for everything that is written in WPF, even for products like NHibernate Profiler and other stuff that I was using on a regular basis without any issues.
Tried to reinstall .NET 4.0 and nothing changed. Any ideas why this might be happening?
I had the same problem. It was a corrupt font cache!!
See http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/7cc032c1-5f4d-4518-adc6-f53afd051e6b for a solution.
If I had to guess I would say video drivers. It might help to try attaching Visual Studio's debugger to the hung process (Debug -> Attach to Process) making sure that Managed Code is the selected debugger type. Then you can break into the debugger and maybe see a common stack trace.

Resources