Visual Studio 2012 xaml Designer System.BadImageFormatException - wpf

Everytime I try to load a WPF window/page/userControl, the xaml designer crashes and System.BadImageFormatException is thrown. I've tried to switch the platform to X86 in configuration manager but it does not work. The following is the complete detail of exception:
System.BadImageFormatException
[C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll] The signature is incorrect.
at Microsoft.Expression.Markup.XmlCharType..cctor()
System.TypeInitializationException
The type initializer for 'Microsoft.Expression.Markup.XmlCharType' threw an exception.
Any idea guys?, thank you!

I've resolved the issue by Windows Task Manager and ending the process 'Microsoft Visual Studio XAML UI Designer'. In fact some issues are solved by stopping this process. Visual Studio automatically run this a new fresh instance of this process.

Related

webview2 refuses to work in visual studio 2017 .net winforms

I have added WebView2 to my visual Studio 2017 VB.NET solution with .NET 4.7.2, as per the instructions on microsoft at https://learn.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/winforms
When I put the webview2 on my form and hit F5 to run it, I always get
System.InvalidOperationException: 'An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object.'
and it is stuck in application in break mode.
Can anyone tell me how to make it work please? Or am I stupid and it will only work in visual studio 2019 with core?

Visual Studio freezes during XamlParseException

Visual Studio 2013 always freezes when XAML parser throw XAMLParseException. It takes sometimes one minute when VS throw exception. It exist some settings how to avoid this behavior?

Visual Studio 2012 crashes when trying to open a WPF project

Whenever I open a WPF project, Visual Studio crashes. I start a second instance and attach the process to the first instance and I receive the following error once the project is "opened":
An unhandled exception of type 'System.MissingFieldException' occurred in Microsoft.VisualStudio.Progression.LanguageService.CSharp.dll
Additional information: Field not found: 'Microsoft.VisualStudio.Progression.Actions.GetNodeAtSourcePosition'.
I'm not entirely sure what to do. I have reinstalled Visual Studio once before and the error still occurs. Any help on this problem would be wonderful!
Had the same problem when creating a new project with VS2012. Applying VS2012 Update 1 did the trick for me.
http://www.microsoft.com/en-us/download/details.aspx?id=35774
Did you have a Beta Version of Visual studio installed in your system prior to this? What is your current version of VS? If yes, then you need to remove all the components of VS Beta version manually.

Visual Studio 2008 WPF Project error "project type is not supported"

I'm running Windows 7 x64 with Visual Studio 2008 (SP1). Yesterday I came across an issue when creating WPF projects. I don't know if I've created any other WPF projects since I installed Win7.
First of all, in the Create Project dialog, the project type says "csWPFApplication" which is weird enough and I never noticed before. When I try creating the project I get 2 Package Load Failure errors for Microsoft.VisualStudio.Internal.WPFFlavor.WPFPackage and then a message that "The project file ... cannot be opened. The project type is not supported by this installation.
I tried a number of different suggestions from Google and even uninstalled/reinstalled to no avail. Any ideas?
Try starting Visual Studio with.
C:\Program Files\Microsoft Visual
Studio 9.0\Common7\IDE\devenv.exe
/resetskippkgs
I would also try to just create a blank solution/WPF project. and then add the files from your old project one at a time, and see if you still get the error.
If that doesn't work, I would try to uninstall and reinstall .NET 3.5 which looks it could be corrupt.

Visual Studio 2008 Xaml Editor not working / disappeared

When I start up VS 2008 to work on a WPF / Silverlight App and open a XAML or XML file the XAML / XML editor is no longer working. The designer does not show up and intellisense is unavailable. It basically looks like a text file has been opened.
Try running the following command.
"%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\ide\devenv" /resetSkipPkgs
If that doesn't work try repairing the Visual Studio Install
Start -> Control Panel
Add Remove Programs
Select VS
Choose repair
The designer for XAML is awful. Do yourself a favour and set your XAML files to open in the code viewer instead; they'll load quicker and you won't have to deal with the designer's flakiness.
However, to fix the intellisense, just re-register TextMgrP.dll using regsvr32 as indicated here.
I've seen this problem before, running this command should fix it :
Devenv.exe /ResetSkipPkgs
If you right click the file, select "Open With", and then choose "Windows Presentation Foundation Designer", does that work? If so, most likely the default editor for .xaml files has changed. You can reset this back to the designer by pressing "Set as Default" when the designer you want is selected in the list in the Open With dialog.
It looks like there is an XML package that was previously not loaded, see other question here;
Visual Studio 2008 XML Editor Disappeared
Also, there is an answer on the Silverlight forums that describes using the "devenv /setup" command that can be found in (VS2008InstallationDirectory)\IDE.
AHHHHHHHHHHHHHHH!!!!!! It finally worked!!!!! Only after a week of pulling my hair out. I had multiple issues.
Xaml editor and add DataSource Wizard and other things would not work with VS 2008.
Tried to install SP1. It would not let me because Office Suite 2007 was in the middle of an SP1 update and would not finish.
Un-installed Microsoft office and reinstalled and service packed.
Tried devenv /setp & devenv /resetskippkgs to no avail.
Finally service packed VS2008.
Retried the devenv /setp & devenv /resetskippkgs twice and voila!! It worked.
Thanks a bunch.
i had similar problems when i installed VS2008 Professional over an existing VS2008 Express edition. Suddenly my XAML designer stopped working . i got failed loading the XAML dll error.
So i just uninstalled all VS Express stuff and then installed VS 2008 SP1 fixed all things.
try link below for VS 2008 SP1.
http://www.microsoft.com/downloads/details.aspx?FamilyId=27673C47-B3B5-4C67-BD99-84E525B5CE61&displaylang=en

Resources