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.
Related
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.
Ok, I'm at a loss.. I have never seen this happen before. I am using Visual Studio. I have been working on a regular WPF project. It was working fine. This morning, I made a few changes to add a .dll project to my solution and link directly to it. Now, I click the green arrow, or F5 to start debugging, and it clicks and then goes green again. There is no debug output, the program doesn't start running. There are no exceptions thrown. What the heck happened?
It's a pretty big project, so I can't put any useful source code here. I'm just wondering if anybody has ever had a case where they push F5 to start the app, and nothing happens..
Any help would be appreciated. I am at an utter loss as to what would cause this.
WPF apps usually just die without an error message if there is a problem during start-up.
You can try to configure your IDE to break on thrown exceptions:
Debug -> Exceptions:
Check the checkbox in the column Thrown in the row "Common Language Runtime Exceptions".
Ok, I am a blithering idiot. The problem was that I had 2 instances of Visual Studio open at the same time and on the same project. When I closed down Visual Studio, I noticed the other instance and closed it too. Then I opened just one and everything wants to work now.
So wierd, but fixed now.
Word of warning. Only open your project once.... :-)
Thanks to all for the help. You all get points !!
I'm developing a SL4 OOB application that has suddenly started giving me the white screen of death.
If I try to run it 'in-browser' and check the console I can see the error 2105 : 'Failed to load pre-requisites for the application' but there's very little info about it anywhere.
None of my breakpoints get hit. Even starting the app with F11 (step into) doesn't get me anywhere.
I can run other Silverlight projects just fine so it's not the runtime. I've even copied the source into another project to see if that might help but to no avail.
Does anyone have any ideas how I might get started fixing this?
I have seen this myself and it was a pain..
What I had to do was a system restore, de-installed all traces of Silverlight and Blend and then reinstalled them all. However I had also just installed Silverlight 5 RC which didn't play nicely with Telerik and might have been the problem.
There is also some information about this error here:
http://connect.microsoft.com/VisualStudio/feedback/details/530074/unhandled-error-in-silverlight-application-2105-when-building-as-an-x86-configuration.
Is this your problem?
Damn it, I hate answering my own questions but the problem was quite obscure.
Somehow, I managed to get a regular .Net reference in my Silverlight project through a Nuget package. That was it.
DOH!
I've got a problem with Silverlight, or maybe more with VS2010 Ultimate. I was fooling around playing with it, when in one moment a fix that I wrote didn't fix anything. Investigating why I found out that VS is not running the new version which it just compiled, but rather an old version of application - that's why my changes don't affect it. How to fix it, and what can be the source of the problem? Maybe project configuration file got corrupted or there's something wrong with ASP.NET dev server?
Have you look at the output window? Sometimes it gives errors that aren't listed in the Error List.
Side note: I didn't see you mentioning extra libraries, but I've had this happen when a change I was making in a library wasn't reflected in another Silverlight application. For whatever reason, when I was adding a reference to the library it was copying it to the debug directory of my project and only using that version (Specific Version was off). if you're using custom libraries, you can try deleting the references and re-adding them (this works, a more permanent solution is to add the library to the solution and add it as a project reference).
I've resolved the problem which I had. The thing I did is just painfully simple - I cleared browser's cache :P
Has anybody found a fix for Visual Studio crashing with this error (eventlog)?
.NET Runtime version 2.0.50727.3082 - Fatal Execution Engine Error (7A2E1132) (0)
It does this when I start debugging with a problem in the xaml. Visual Studio will then silently disappear.
I've looked at SO and MS Connect but haven't found a fix or workaround. I often read that you should disable all addins but I don't have any.
EDIT: Yes, I have SP1 and the following fixes installed:
Version 9.0.30729.1 SP
KB944899 KB945140 KB945282 KB946040 KB946308 KB946344 KB946581 KB947171 KB947173 KB947180 KB947540 KB947789 KB947888 KB948127 KB953256 KB956453 KB957912 KB958017
Every time I've seen this, it's because you end up with two different versions of WPF loaded at the same time (i.e. one from GAC and one from Reference Assemblies).
In the .csproj file, is there a line called something to the effect of "Allow XAML to be Compiled in Same AppDomain"? (Sorry I can't actually remember the real name) - Blend likes to put this in and it causes problems.
I have had crashing problems with VS2008's WPF designer too. I workaround by avoiding the designer and editing the XAML by hand.
Thanks to Paul I found a very strange workaround (I verified it a few times)
open the solution
unload the project (context menu)
edit the csproj (context menu), don't make any changes
reload the project (contect menu)
If I do that before I start the debugger VS will not crash.
I just found another strange way of getting around this problem. I load the solution and before opening any xaml page, I rebuild the project. The xaml pages loads fine afterward and VS2008 does not crash.
Have you updated your VS install to SP1? There are a number of crashes fixed in the SP1 patch.
If you have installed SP1, try installing the following patch as well. It's a further fix for debugger related issues in VS 2008 SP1
http://support.microsoft.com/kb/957912
I had the same problem when trying to edit an ASP.NET MVC master page or view. I found this link. I had MBUnit Gallio installed on my machine with VS2008 integration. The problem went away when I uninstalled Gallio.
I just solved this problem (well the symptom anyway) by creating a new solution and adding all the projects in the "problem" solution into this new solution. After doing this and discarding the old solution, everything works fine.
I had the same problem after installing devart code compare V2.80.11 - earlier versions did not have this problem. After removing devart the problem went away. Reinstalled and problem came back.
I like devart code compare so I intalled it without VS2008 integration. Everything works fine now.