问题
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.
回答1:
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
回答2:
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.
回答3:
I've seen this problem before, running this command should fix it :
Devenv.exe /ResetSkipPkgs
回答4:
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.
回答5:
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.
回答6:
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.
回答7:
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
来源:https://stackoverflow.com/questions/859335/visual-studio-2008-xaml-editor-not-working-disappeared