locked
XAML Intellisense not working in VS2008SE RRS feed

  • Question

  •  The Text Editor options for XAML are blocked from edit and empty. WPF projects do not have intellisense active for my VS2008SE. I have checked the registry for 

    ·         HKEY_CLASSES_ROOT\CLSID\{73B7DC00-F498-4ABD-AB79-D07AFD52F395}\InProcServer32

    and it is assigned the correct value for "default" which I believe should be  -

    C:\Program Files\Common Files\Microsoft Shared\MSEnv\TextMgrP.dll 


    Bob
    Monday, February 16, 2009 10:18 PM

Answers

All replies

  • Most of the options on the General page are shared across all languages.  They are not supported by the XAML editor so they are disbled.  Subsequent pages are partially or completely defined by the editor so they should be enabled.

    When you say IS doesn't work are you talking about within the XAML view of a XAML file or on the code side?  What edition is VS2008SE?  I'm only aware of Express, Pro, Team Suite, Team Edition for Tester, Developer and Architect.  Do you have SP1 installed?

    Michael Taylor - 2/17/09
    http://p3net.mvps.org
    Tuesday, February 17, 2009 2:19 PM
    Moderator
  • Thank you for your reply.

    VS2008SE refers to Standard Edition.

    When I open a WPF Application I have XAML text already entered by the WPF template but no XAML keys words are highlighted.

    When typing my own XAML into that text area there is no intellisense and no keyword highlights.

    Bob 
    Bob
    Tuesday, February 17, 2009 2:37 PM
  • Are you running SP1 of VS?

    Michael Taylor - 2/17/09
    http://p3net.mvps.org
    Tuesday, February 17, 2009 2:59 PM
    Moderator
  • Yes - SP1

    Microsoft Visual Studio 2008
    Version 9.0.30729.1 SP
    Microsoft .NET Framework
    Version 3.5 SP1

    Installed Edition: Standard

    Microsoft Silverlight Projects 2008   91851-136-0012092-60010
    Microsoft Silverlight Projects 2008
    Version 9.0.30729.146

    Microsoft Visual Basic 2008   91851-136-0012092-60010
    Microsoft Visual Basic 2008

    Microsoft Visual C# 2008   91851-136-0012092-60010
    Microsoft Visual C# 2008

    Microsoft Visual C++ 2008   91851-136-0012092-60010
    Microsoft Visual C++ 2008

    Microsoft Visual Web Developer 2008   91851-136-0012092-60010
    Microsoft Visual Web Developer 2008

    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB944899)   KB944899

    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB945282)   KB945282
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/945282.

    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB946040)   KB946040

    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB946308)   KB946308

    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB946344)   KB946344

    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB946581)   KB946581

    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB947173)   KB947173

    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB947540)   KB947540

    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB947789)   KB947789

    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB948127)   KB948127

    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB953256)   KB953256
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.

    Microsoft Visual Studio 2008 Standard Edition - ENU Service Pack 1 (KB945140)   KB945140

    Microsoft Visual Studio 2008 Standard Edition - ENU Service Pack 1 (KB947888)   KB947888
    This service pack is for Microsoft Visual Studio 2008 Standard Edition - ENU.

    Microsoft Visual Studio 2008 Standard Edition - ENU Service Pack 1 (KB948484)   KB948484
    This service pack is for Microsoft Visual Studio 2008 Standard Edition - ENU.

    Update for Microsoft Visual Studio 2008 Standard Edition - ENU (KB956453)   KB956453


    Bob

    Tuesday, February 17, 2009 3:09 PM
  • Also - when I go to the Csharp code behind file -- I see that InitializeComponent is highlighted in red as not recognized.

    I find that curious since this is just the template code.

    If I add Using System.Windows.Markup  -- InitializeComponent is still flagged as unknown.

     -

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    using System.Windows;

    using System.Windows.Controls;

    using System.Windows.Data;

    using System.Windows.Documents;

    using System.Windows.Input;

    using System.Windows.Media;

    using System.Windows.Media.Imaging;

    using System.Windows.Navigation;

    using System.Windows.Shapes;

    namespace WPF_HDI_Context01

    {

    /// <summary>

    /// Interaction logic for Window1.xaml

    /// </summary>

    public partial class Window1 : Window

    {

    public Window1()

    {

    InitializeComponent();

    }

    }

    }


    Bob
    Tuesday, February 17, 2009 3:55 PM
  • Should this have said SP1??

    Version 9.0.30729.1 SP

    Bob
    Bob
    Tuesday, February 17, 2009 4:07 PM
  • There is a disconnect between the XAML namespace in the XAML file and your source code.  Within the XAML file you should see a full typename reference to your class.  This name should match the source code (in this case WPF_HDI_Context01.Window1). 

    If you create a new project does the XAML editor work properly?

    Michael Taylor - 2/17/09
    http://p3net.mvps.org
    Tuesday, February 17, 2009 4:14 PM
    Moderator
  • If I create a new WPF application project -- change nothing in the solution name - just press enter and let everything autocreate from template I get the same problem with  intellisense but InitializeComponent" is recognized as you point out.
     


    Bob
    Tuesday, February 17, 2009 7:07 PM
  • Intellisense, brace matching, coloring and most other editor features are handled by the language service associated with the file you are using.  In your case that would be the XAML language service.  It sort of sounds like the langsvc for XAML is corrupt but you would probably also see other problems such as designer failures or even compilation errors.  Nevertheless reregistering the langsvc might resolve your problem, otherwise you might need to repair the VS installation.  The XAML langsvc is Microsoft.VisualStudio.Xaml.  You can try reregistering it in COM first via regasm.  You might then try running VS with the /resetpkgs command to cause VS to reset the packages.  If neither of these solutions work then a repair might be in order.

    Michael Taylor - 2/17/09
    http://p3net.mvps.org
    Tuesday, February 17, 2009 7:14 PM
    Moderator
  •  I tried repair and it ran ok - but the problem with the XAML text still shows up.

    I tried the /resetpkgs switch on VS2008 and it is unknown - but there is a ResetSkipPkgs switch -- should I try that?

    If you confirm that the Repair would not have done the register function I will try regasm from  C:\Windows\Microsoft.NET\Framework\v2.0.50727 folder.

    I assume that the syntax is 

    regasm.exe  Microsoft.VisualStudio.Xaml /register

    With no other switches -  correct?


    Bob
    Wednesday, February 18, 2009 3:16 PM
  • To register an assembly you need only use regasm and the filename.  The default is to register the given name.

    I swore the VS option was correct.  Maybe it was devenv /setup.  I can't confirm without messing up my install.  You might just want to repair the VS installation if reregistering the package doesn't work.  Be sure that you repair the VS installation by using Add & Remove Programs/Programs and Features rather by going back to the original VS installation media.  This is a known issue with VS after SP1 install.

    Michael Taylor - 2/18/09
    http://p3net.mvps.org


    Wednesday, February 18, 2009 3:33 PM
    Moderator
  • My first resort to was to go to add/remove and do the repair option - insert the product install CD and let the repair do it's thing. That completed ok but I still have the problem.


    Bob
    Wednesday, February 18, 2009 4:26 PM
  • When I go to C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\1033\

    I find Microsoft.VisualStudio.XamlUI.DLL but no Microsoft.VisualStudio.Xaml.DLL

    Would it help if I applied this hotfix?

    http://support.microsoft.com/kb/958017

    When i look at the hotfix history above -- it looks like this one is later that what I have installed


    Bob
    Wednesday, February 18, 2009 4:39 PM
  • Wednesday, February 18, 2009 5:23 PM
    Moderator
  • Hotfix did not do it.

    But I tried the devenv/resetskippkgs as per your suggestion -- and all is well - WPF projects are able to use intellisense etc.

    Many Thanks for taking this time to work with me on this.


    Bob
    Wednesday, February 18, 2009 8:59 PM
  • I have the problem when i add a reference to my solution
    The problem is caused by Microsoft.Practices.Composite.Wpf.dll (runtime version v2.0.50727)
    when i add this as a reference to my solution i have no intellisence.
    What to do?
    Tuesday, November 24, 2009 8:14 AM
  • I believe your problem might be related to XAML directly rather than the IDE.  Please submit your issue in the WPF forums.

    Michael Taylor - 11/24/09
    http://p3net.mvps.org

    Tuesday, November 24, 2009 3:42 PM
    Moderator