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.
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.
I have a similar problem as previously reported (and unanswered successfully/unsolved) as below:
"If I create a new project in Visual Studio 2010 SP1 and select "WPF Application" it generates the application, but I get the error "The name 'InitializeComponent' does not exist in the current context" even before i build it.
I get the same error when I try to build established projects. Yesterday, I had no problems with it.
"
Im pretty sure that this issue is nothing to do with the project, source files or generated settings, but may have to do with a corrupt visual studio installation, registry, .net or windows itself because the same project (exactly the same) builds fine on my coleagues computer and vice-versa does not. Also, i have reinstalled Visual Studio, uninstalled & reinstalled, deleted & reinstalled, install-fixed from the microsoft disks and even tried manually deleting Visual studio/.net/C# and still get the problem. This issue is with both new WPF projects created with the wizard and with existing projects created weeks earlier.
The only option that seems to present itself now seems to be wiping my hard drive and reinstalling windows and Visual Studio again etc.
Any ideas regarding the fault or how best to wipe my system down to a level that will truly eradicate Visual Studio and its registry setting would be gratefully received ?
I had the same problem and eventually discovered (after reinstalling VS and that had no effect) that by removing and re-installing the .Net frameworks the problem went away.
There are two primary causes of this very common and annoying problem!
The most common is the x:Class doesn't match up with the MainPage.xaml namespace. Make sure that x:Class in MainPage.xaml has the correct namespace.
The second most common cause of this problem is that the "Build Action" is not set to "Page" for MainPage.xaml!
This happens with Silverlight or WPF and though it is a PITA when you don't know what caused it once you know what the problem is; it is a simple fix. One of those things we all have to learn the hard way, but thanks for Stack Overflow.
I wrote a blog article that has pictures and explains Initialize Component does not exist in current context problem.
Configuration:
Windows 7, 64 bit
Microsoft Visual Studio Professional 2012 RC Version 11.0.50522.1
RCREL
Running VS in administrator mode
The VS solution contains a web
application, with target: .NET Framework 4.
When I press F5, the solution builds... and nothing else happens.
Happens with both IIS or the VS Dev Server.
Happens with Platform Target of "Any CPU" or "x86"
If instead, I use the Debug / Attach to Process... menu, after a few seconds, I get:
"Debugger is Busy" - Debugger is performing a remote operation that is taking longer than expected. This dialog stay until I click "Terminate" and confirm it.
Then this dialog appears:
"Microsoft Visual Studio"
"Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named [COMPUTER NAME]. The network connection to the Visual Studio Remote Debugger has been closed."
After clicking OK, the 'normal' "Attach to Process" window finally shows up. In it, the list of "Available Processes" is empty.
Any suggestions or clues?
The main points that I wonder about:
Why is the list of processes empty? It is not surprising that the debugger does not work if it cannot see any processes.
Why is it trying to do "remote" debugging, when it is just accessing the local computer?
(Cross posted on social.msdn)
I had the same problem in VS 2012 (not the RC, but the final release) using a VS 2010 project. It would build fine, but the debugger would not start. So, I modified the solution file:
Changed "Format Verion 11.00" to "Format Verion 12.00"
And changed "# Visual Studio 2010" to "# Visual Studio 2012"
It's a workaround for now until my company upgrades its projects to VS 2012.
I've got a similar setup and I'd followed all the suggestions here and on Microsoft Connect - none of which worked for me. The only thing that did work was renaming MSVSMON.EXE in the x64 folder to MSVSMON.EXE.OLD and copying in the file from the x86 folder in it's place. I'm not sure if there are any other implications in doing this but it seems to have solved the problem in my case.
I eventually resolved this problem by deleting the msvsmon*.* entries in the \Windows\Prefetch folder. After doing so I could debug normally.
Ultimately, a Repair of the VS2012 resolved this issue for me. I followed the advice found at your social.msdn cross-post without any resolution (Devenv.exe /SafeMode /ResetSettings /ResetSkipPkgs and /Setup). Like you, my solution (VS 2010 SP1) also has a web application (targeting .NET 3.5), and the startup project is set to a winforms app. The ASP.NET development server did not start, nor did the app I was trying to debug.
Note that this issue was also posted to Connect at this link (by you?). If anyone else sees this issue, the Connect folks are requesting running the Microsoft Visual Studio 2012 Feedback Tool to collect data. As I started the Repair process prior to finding the Connect issue, I did not and was not able to provide feedback to MS with logging.
Seen a similar issue when running both Visual Studio 2010 and Visual Studio 2012 at the same time. Closing Visual Studio 2010 allow the debugger to start working in Visual Studio 2012.
I had the same issue - starting debugger just told me what a good job it had made of the build and the decided that that was enough.
I feared the worst, but luckily for me a reboot fixed the problem.
I know that this is therefore a pretty useless post in as far as offering help to anyone suffering with this issue, but I thought it was worth noting the point as it shows a) another person with the same problem so please fix it MS, and b) that sometimes a reboot fixes it so maybe that tells the maintainers something.
If you are opening a VS 2010 project with the new VS 2012 version it's probably your bin and obj folders that are causing the problem,deleting them solved the problem for me.Or you could clean your solution but I preferred manual deletion.
I just closed and reopened VS. This seemed to fix my problem
On another computer, with the RTM of Visual Studio 2012, I opened an older project and found that I could not press F5 to start the application. All that seemed to happen was a message in the status bar on the bottom edge of the window: "This item does not support previewing".
This solution had two projects, and the correct one was bold in the Solution Explorer, presumably indicating that it was the startup project.
However, after selecting the project and choosing "Set as Startup Project" in the context menu, I was then able to use F5 to run and debug it.
It turns out that the "This item does not support previewing" was nothing to do with the problem, but is a message that shows on the status bar whenever the item just selected in the Solution Explorer does does not support previewing.
For what it's worth, I found that I received this error message when I had an entry missing in my hosts file. I am using local domain aliases and the one I was trying to debug with wasn't in hosts. Adding the missing entry solved the problem for me.
Just copy all dte*.olb files, from C:\Program Files (X86)\Common
Files\Microsoft Shared\MSEnv to C:\Program Files X86\Microsoft Visual
Studio 9.0\Common7\IDE.
From https://mycodepad.wordpress.com/2013/12/07/visual-studio-2012-4-run-as-administrator-the-application-cannot-start-error/
Just my two cents,
I have experienced this issue twice now and it turns out after all of the suggestions I tried, it was BitDefender on my local machine that was doing this. So my fix for this problem is to try adding in exceptions to the local security software into the firewall and AV parts of it. Tell it to ignore the msvsmon.exe and devenv.exe altogether and see what difference that makes.
Otherwise try ripping it off altogether and see if the it lets you debug your solution.
You can see here for more info: http://forum.bitdefender.com/index.php?showtopic=37028
I installed the latest BitDefender version and all was fine for me.
I personally encountered some comparable problem: Visual Studio 2010 did not begin debugging but froze.
When I clicked VS it displayed a "Wait some more" or "Switch to" message box which didn't help me.
Using a task manager I could kill the *.vshost.exe process which brought VS back to life but aborted the debugging. Launching the program without debugging started the application instantly.
Solution:
Disable the indexing service for your code directories! Either deactivate the index service or uncheck the folders in the Indexing Service control panel.
Had this problem for a C++ application. Looking at the devenv.exe events in ProcMon pointed me to it trying to load a Visual Assist configuration file, which I had in my disk cleanup zeal accidentally deleted. Removing and then installing the extension again fixed it for me.
I have fixed the same issue by checking off the "Enable the Visual Studio hosting process" option from the start-up project Properties->Debug - Enable Debuggers options
All you have to do to fix this is go "Project > Set as StartUp Project" then hit F5 or the debug button and it will work!!!
I had VS2010 running fine with Silverlight development. Then I installed Expression Blend 4. Now when I run VS2010 and try to debug a silverlight app I get an error saying "Unable to start debugging. The silverlight developer runtime is not installed. Please install a matching version." I've tried uninstalling silverlight tools, and reinstalling them from scratch (the latest april version). But I still get the same message. So basically I'm now unable to do VS2010 SL development. I'm on the verge of just rolling back to my last system restore point and giving up on Blend. But if I do that I'd be worried that Product Activation would never allow me to reinstall it in the future, since the MSDN download page implies I'm only ever allowed to install it on a single machine. Any help appreciated.
Thanks
I had the same problem after installing Expression Studio 4. I installed the Developer version of Silverlight at: http://go.microsoft.com/fwlink/?LinkID=188039
and the problem seems to be resolved.
Hope that helps.
Try reinstalling or reparing the Silverlight_Tools for Silverlight 4.
You tried that.
The product activation system isn't that draconian it has to allow for things like hardware failures etc which would require re-installs.
Thanks for the suggestions. I solved it this way: Since I'm running under parallels, I rolled back to a snapshot taken before I'd installed Blend. Then I rebooted Windows. Then I reinstalled Blend (happily with no draconian activation problems!), and everything worked.
So why did it work the second time and not the first time? The first time I installed Blend, I'd shut down VS2010, explorer etc, but not rebooted. Perhaps some hidden VS-related process was still running. Installing Blend in that situation screwed everything up, and removing and reinstalling stuff didn't fix it. Obviously the Blend installer should have spotted the dangerous process and taken remedial action, but it didn't. Perhaps MS recommends you reboot before installing new software? That would be a bit of a nuisance, and I've never needed to before. My real lesson from this is to work in a VM and take regular snapshots.
Thanks again.
I built a WPF application in VS.NET 2008 using ClickOnce deployment. It ran great on any machine that had VS.NET installed, but my business users received an error: "Unable to install or run the application. The application requires that assembly Microsoft.Windows.Design.Extensibility Version 3.5.0.0 be installed in the Global Assembly Cache (GAC) first."
I was surprised to discover that this dll is not part of the standard .NET 3.5 SP1 client installation, but somehow, my application thought it was needed. I checked my Publish tab for the project and it showed up as a prerequisite.
Oddly enough, I was able to just remove this (and all of the other Microsoft.Windows.Design.* dlls) and it just worked everywhere. I removed them from my project entirely, and everything was fine.
Can someone explain why the VS.NET 2008 project wizard forced these to be included in the project, and more importantly, why ClickOnce thought they needed to be on the client machine to run?
This is just a curiosity question, but I'm sure I'm not the first to be bitten by it. Hopefully, this post will at least save someone else the headache.
Try to remove all references to *.Design.dll. In my case it was WPFToolkit.Design.dll.
This is old and the OP is gone, but I ran into this today, so I thought I'd mention that my solution was removing a reference to one of the WPFToolkit references that ends with .Design.
I had referenced System.Windows.Controls.Input.Toolkit, but also had a reference to System.Windows.Controls.Input.Toolkit.Design, which should not have been there. Removed it, and all was right with the world again.
A way to find out the code that is loading the assembly is explained here:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/755272f6-0e79-4a6d-ae50-4412d0f2bc4c
I found that I was using the SelectionCommands.Clear property which is inside the Microsoft.Windows.Design.Interaction namespace inside the Microsoft.Windows.Design.Extensibility Version dll.
Beats be why this dll isn't included in the .NET 3.5 install.