views:

4873

answers:

13

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.

A: 

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.

Andy
+11  A: 

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
JaredPar
This is overkill. The solution is just to re-register the TextMgrP.dll.
Jeff Yates
@Jeff, not necessarily. There are numerous problems that can cause this behavior in VS. This solution is the one most likely to fix the problem. Re-registering that DLL will only fix one very specific problem. I've found the package reload issue to be much more common than a non-registered DLL.
JaredPar
This is essentially what the other post says, either the /resetSkipPkgs switch or the /setup switch. Just trying to get an answer for people looking for the XAML editor based answer.
@Jared: The designer rarely works, regardless of the package loading and the broken intellisense is a known issue fixed by re-registering the TextMgrP.dll. Trying this first and then attempting your other suggested options would be prudent as it is quick, and if it works, it saves a lot of time.
Jeff Yates
@Jeff, I disagree with your "rarely works" statement. I have VS installed on many many machines and rarely see a problem with it working. Re-registering textmgrP.dll has *never* fixed a problem I've had. That's not saying it won't work but every problem I've seen has come down to a bad install or a suppressed one time package load failure.
JaredPar
Amitd
+2  A: 

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.

Jeff Yates
I whole-heartedly agree. I just used the designer in my answer, based on the wording in the original question.
Andy
A: 

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.

A: 

I've seen this problem before, running this command should fix it :

Devenv.exe /ResetSkipPkgs
Moayad Mardini
A: 

AHHHHHHHHHHHHHHH!!!!!! It finally worked!!!!! Only after a week of pulling my hair out. I had multiple issues.

  1. Xaml editor and add DataSource Wizard and other things would not work with VS 2008.
  2. 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.
  3. Un-installed Microsoft office and reinstalled and service packed.
  4. Tried devenv /setp & devenv /resetskippkgs to no avail.
  5. Finally service packed VS2008.
  6. Retried the devenv /setp & devenv /resetskippkgs twice and voila!! It worked.

Thanks a bunch.

Jesse Seger
A: 

I have the same problem. Installed Visual Studio 2008 Professional Edition and tried to work with WPF and when i create project there is no designer layout appears and don't know what to do since i am a beginner to .Net. Moreover, I have installed VS 2008 Express Edition maybe that causes to happen such things...

Anyway I'll try out what people says!!!

Suhrob Samiev
A: 

Guys i am not able to find devenv.exe /setp. I tried looking into the various commands that devenv supports but there this setp is not there. Can anybody pls help!!

dhaval
A: 

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

Amitd
A: 

I would suggest: for int i 1 to 2 do

Good luck!

codeguru
A: 

Resolved!!

CLS PRINT "Guess My Number" INPUT "Would you like to play"; choice$ 'An input statement, that takes what the user inputs... choice$ = UCASE$(choice$) ' makes the input completely uppercase (fkld ---> FKLD) IF choice$ <> "YES" AND choice$ <> "Y" THEN ' and decides whether or not they want to play: END END IF guesses% = 5 ' Set up number of guess remaining RANDOMIZE TIMER ' Sets up the random number generator target% = INT(RND * 10) + 1 WHILE guesses% > 0 INPUT "Guess a number: ", guess% ' Takes user input (the guess) IF guess% = target% THEN ' Determines if the guess was correct PRINT "You win!" END ELSE guesses% = guesses% - 1 PRINT "Sorry, please try again. You have ";guesses%;" guesses left." END IF WEND

PRINT "You ran out of guesses, the number was "; target% END

codeguru
A: 

Thanks, you saved my hair :)

Mustafa Kok
this is not an answer. Please use comments
Francesco De Vittori
A: 

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

It Works..............................

Really Just Reinstall Visual Studion 2008 SP1 Again


Pritesh
this is not an answer. Please use comments
Francesco De Vittori