locked
VS2010 XAML namespace intellisense not working

    Question

  • When I type in a namespace in XAML, I'm not getting any intellisense.

    For example:

    xmlns:local=""

    In VS2008 I would get a long intellisense list here. In VS2010 I get nothing. I have tried this on 2 different computers. What am I missing?

    Monday, June 14, 2010 12:21 PM

Answers

  • Hi again @GSyren

    Firstly please accept my apologies for the handling of this issue. On deeper investigation, it turns out that this problem is nothing to do with the "Mark of the Web".

    We have done some in-house investigation, and determined that there is an issue in the WPF/Silverlight Designer, which will (mistakenly) prevent the WPF and Silverlight designer in Visual Studio 2010 from correctly loading projects which are hosted on a LAN share such as the one you are using. We are currently investigating this but cannot make any comment on when or whether a fix may be available at this time.

    In the meantime as a workaround, I am afraid you will need to try moving your project to a local drive and ensure it opens satisfactorily there

    • You will need to ensure that all references in the project also point to local copies of the assemblies on the local hard disk
    • You will want to use a backup program, e.g. Windows Backup, to regularly copy the project to your network share to ensure your work is backed up to your shared network drive in your particular scenario

    Once again, I apologize for the long delay in confirming this and any confusion that may have arisen.

    We will post to this thread when we have a clearer view of when and whether a fix might be made available for this problem.

    Mark Wilson-Thomas

    Program Manager, WPF & Silverlight Designer Team, Visual Studio


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Monday, July 12, 2010 6:01 PM

All replies

  • Sorry you are having an issue with IntelliSense.  We have seen very few issues with XAML IntelliSenses.

    This typically happens when Visual Studio can't resolve a type when its building the list of items for IntelliSense.

    Is this happening on a new project?

    Is this problem specific to a certain project?


    Cheers, Karl - Microsoft Cider Team, http://karlshifflett.wordpress.com/
    • Edited by karl140.6 Wednesday, June 16, 2010 7:55 PM mistake
    Wednesday, June 16, 2010 7:53 PM
  • Hi @GSyren

    Sorry to hear about this difficulty. This feature should work just fine in Visual Studio 2010 so we need to work out what is happening in your case.

    Can I ask a couple of follow up questions?:

    Could you please check the following things to see if it brings Intellisense back/ tell us what the behavior is:

    1. Rebuild your solution.
    2. Close and re-open your solution.
    3. Create a new WPF project and try the same action there - does it work for a new project?
    4. Debug VS with another instance of VS by using Tools->Attach to process...->devenv.exe, and see in the Output window what kind of exceptions get thrown while trying to open XAML IntelliSense.

    Hopefully that will help us to narrow down the issue.

    Thanks

    Mark


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Wednesday, June 16, 2010 7:58 PM
  • Rebuild, close and re-open did not fix the problem.

    Nothing shows in the Output window of the other VS session that is attached to devenv.

    It does work OK in a fresh new project. I only have 2 projects built in 2010. It doesn't work in either. I haven't tried to port any 2008 projects yet.

    I'm running VS 2008 and 2010 on the same computer, if that has any baring on the case.

    Regards,

    /Gunnar

    Thursday, June 17, 2010 12:21 PM
  • Hi @GSyren

    Thanks for the info.

    Since the problem is specific to the projects you are working with, please can you try to pare down a XAML file that has the problem to the minimum XAML that illustrates it (e.g this might even be a new XAML file in your problem projects), and share that XAML (or perhaps a cut-down project) that shows the issue along with any needed dependencies?

    Thanks

    Mark


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Thursday, June 17, 2010 9:02 PM
  • Ok, I'll give it a shot, but just FYI I'll be gone until June 28 so I won't be able to look at it before then.
    Friday, June 18, 2010 10:26 AM
  • No problem; thanks for the input. We'll await your respose.

    Mark


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Wednesday, June 23, 2010 9:29 PM
  • Curioser and curioser. This is what I have found so far...

    - If I create a new project, it works ok.

    - If I add one of the problem projects to the new project (so I get a 2 project solution), it works ok in the new project initially, but if I try to add a namespace in the old project, it doesn't work, and after that the new project seems "tainted" as well, because now it doesn't work there either.

    - Removing the old project from the solution does not restore the ability to get intellisense for a new namespace in the new project.

    I did a test; I created and saved a project and then I copied all files to another location. Then I added the trouble project to the original solution, tried to add a namespace, removed the trouble project and saved everything. A comparison with the saved project showed that the only files that differed were the .sln and .suo files. The .sln file now had 10 lines added to it that weren't there before.

    I don't know if it's of any relevance, but when I add my trouble project I get a security warning that the location is not fully trusted (because it's on a network drive). But all my projects are saved to the same network drive, so...?

    Any ideas?

    /Gunnar

     

    Monday, June 28, 2010 8:11 AM
  • Gunnar,

    The WPF & Silverlight Designer does not support loading assemblies from the network.

    I have written a post here: http://blogs.msdn.com/b/wpfsldesigner/archive/2010/02/03/loading-projects-in-visual-studio-not-located-on-local-machine.aspx that describes how you can avoid the security warnings but DO NOT RECOMMEND doing this.

    Please move the assembly to a local drive and let us know if this fixes the problem.

    Before moving the assembly, what happens if you try and open one of the XAML files in the network assembly in the Designer?  Does the Designer load or do you get an error.  If you get an error, please paste the error text in this thread.

    Thank you and have a great day,

    Karl


    Cheers, Karl - Microsoft Cider Team, http://karlshifflett.wordpress.com/
    Monday, June 28, 2010 6:13 PM
  • Hm, that doesn't make much sense to me.

    Out company policy is for all users to have My Documents mapped to a network drive, so it gets backed up every day.

    Forcing people to have stuff locally is actually a security risk, IMHO, (though maybe of a different kind) because IT departments do not usually back up people local disks, and relying on the users doing it themselves is rather iffy.

    The network share IS mapped, as you suggest in the post you refered to. Adding loadFromRemoteSources didn't change anything either.

    I have VS 2008 on the same machine (for projects not yet migrated), and it works OK there, so why should it not work in VS 2010.

    Adding the line

    xmlns:local="clr-namespace:MyProgramName"

    did not generate any immediate error, but on subsequent loads it does give the "Unable to load the metadata..." error (despite loadFromRemoteSources).

     

    Best regards,

    /Gunnar

     

    Tuesday, June 29, 2010 6:27 AM
  • Gunnar,

    "Unable to load the metadata..."   Can you please send me the entire message.  If you click the gold bar, the message will drop down and show the stack trace.

    Visual Studio 2010 has a different/better security model than 2008 which is why you're seeing the issues.

    Don't want to tell anyone how to run their business, but I'll offer a suggestion.  Backups are critical.  At work and at home I use Windows 7 Backup.  Select folders you want backed up and it does a great job.  Does a weekly full backup with daily incrementals.

     

     

     


    Cheers, Karl - Microsoft Cider Team, http://karlshifflett.wordpress.com/
    Tuesday, June 29, 2010 5:48 PM
  • Unable to load the metadata for assembly 'NyckelordsEditor'. This assembly may have been downloaded from the web.  See http://go.microsoft.com/fwlink/?LinkId=179545.  The following error was encountered during load: Could not load file or assembly 'NyckelordsEditor' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

    And yes, I agree that backups are critical. That's why every user gets a private network share where everything essential is stored (including VS projects), and that is backed up automatically each night. Just how that becomes a security risk is beyond me. Seems to me that VS 2010 may have taken security to a level where it becomes a hindrance more than a help. :-\

    /Gunnar

    Wednesday, June 30, 2010 7:28 AM
  • Hi @GSyren

    The problem you are hitting is the "Mark of the Web".

    Follow the instructions here

    http://msdn.microsoft.com/en-us/library/ee890038.aspx (which is pointed to by the go-link http://go.microsoft.com/fwlink/?LinkId=179545 in your error message)

    for the assembly NyckelordsEditor (wherever it is located), and your problem should be solved.

    Please let us know how you get on.

    Thanks

    Mark


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Thursday, July 01, 2010 6:59 PM
  • On the topic of backups, the method we see most development teams adopt for this is to use a source code control system, and back that up. In that scenario, users' code is typically on a local hard drive, and does not need backing up; only what's in source control needs to be backed up.

    This can also deal with "work in progress" that isn't ready for a final checkin, as long as your SCCS has a "shelve-set" notion that lets you submit works in progress in private developer workspaces without making them part of your main code body.

    Mark

     


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Thursday, July 01, 2010 7:05 PM
  • That's all very well, but I don't work for a development company. I work for a general IT company where only a few people are developers. Therefore the whole IT structure is set up for the best way to handle everybody's backups.

    So regardless of what most development teams do, the policy at this company is to have all work material on our network drives. And Microsoft seems to have decided that we are not supposed to do that. The reason is still unclear to me.

    However, I shall follow the instructions and see if it helps.

     

    Best regards,

    /Gunnar

     

    Edit: Tried to follow the instructions. I don't see any Unblock button (Win 7).
    Also, the instructions talk about assemblies downloaded from the web. I don't consider using assemblies on my private network share to be downloaded from the web...

    FYI I'll be off a week again. Back on July 12.

    Friday, July 02, 2010 5:28 AM
  • Like I said, I don't see any Unblock button. Is there another way to flag the assembly as trusted?
    Monday, July 12, 2010 7:41 AM
  • Hi again @GSyren

    Firstly please accept my apologies for the handling of this issue. On deeper investigation, it turns out that this problem is nothing to do with the "Mark of the Web".

    We have done some in-house investigation, and determined that there is an issue in the WPF/Silverlight Designer, which will (mistakenly) prevent the WPF and Silverlight designer in Visual Studio 2010 from correctly loading projects which are hosted on a LAN share such as the one you are using. We are currently investigating this but cannot make any comment on when or whether a fix may be available at this time.

    In the meantime as a workaround, I am afraid you will need to try moving your project to a local drive and ensure it opens satisfactorily there

    • You will need to ensure that all references in the project also point to local copies of the assemblies on the local hard disk
    • You will want to use a backup program, e.g. Windows Backup, to regularly copy the project to your network share to ensure your work is backed up to your shared network drive in your particular scenario

    Once again, I apologize for the long delay in confirming this and any confusion that may have arisen.

    We will post to this thread when we have a clearer view of when and whether a fix might be made available for this problem.

    Mark Wilson-Thomas

    Program Manager, WPF & Silverlight Designer Team, Visual Studio


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Monday, July 12, 2010 6:01 PM
  • Thanks Mark,

     

    I guess I can live with the above as a workaround. I'm just glad we got the the root of the problem. I do hope that you can find a solution, though.

    Best regards,

    /Gunnar

    Tuesday, July 13, 2010 5:19 AM
  • I have the same issue and this is very annoying.
    Wednesday, July 14, 2010 7:42 PM
  • Same issue here as well, and none of the referenced files are on network shares or have been downloaded from the web.

     

    • Proposed as answer by swack2 Wednesday, December 01, 2010 10:37 PM
    Thursday, July 15, 2010 10:27 AM
  • Gunnar,

    We ran into a similar issue.  We keep the live versions of about 40 Assemblies in network path D:\Assembly\. 

    You can trick VS2010 into thinking the files are on the local drive by making a directory symbolic link on your local drive that points to the network drive.  In our case each developer typed the following:

    cd\
    mklink /D Assembly d:\Assembly

    Then we changed the references in our projects to point to C:\Assembly\[Whatever].  It works with sub-folders too (e.g. c:\Assembly\PDF\PDFLibrary.dll)

    This allowed us to leave the files on the network drive, but VS2010 thinks they're local. 

    Brian

    • Proposed as answer by bes7252 Thursday, July 15, 2010 3:35 PM
    Thursday, July 15, 2010 3:35 PM
  • Thanks for sharing this @bes7252.

    Without going into too much detail, the fix required for this problem is likely to be quite complex, and may not be appropriate to make in the short term (i.e. may need to wait until a major version change)

    To ensure I have a clear understanding of this issue, I'd like to understand:

    1. How many of our users are affected by this problem (the inability to load projects from a network share)?

    2. Whether the workaround described is acceptable if you are affected?

    If you are affected by this issue, please drop me an email at mwthomas at microsoft dot com, with the answers to the above 2 questions.

    If you are seeing the namespace intellisense problem and your codebase is NOT being loaded from a network path, you likely have a different problem and we will need to investigate it further to discover the root cause. The most effective means of investigating this sort of issue is to attach a second instance of Visual Studio in debug mode (as described further up this thread), and describe what happens in the output window of the second instance when you see the failure occur in the first instance.

    Thanks

    Mark


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Thursday, July 15, 2010 8:41 PM
  • Here is the output that happens when the problem occurs while debugging VS2010 with another instance:

    A first chance exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll
    A first chance exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll
    A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
    A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
    A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

    Friday, July 16, 2010 11:18 AM
  • Hi @qs7000

    Thanks for digging in - the next step is to drill in on these exceptions to find out what code path is trying to load these types.

    To do this, you will need to configure your debugging instance of VS2010 to break on the System.IO.FileLoadException and the System.IO.FileNotFoundException.

    This link gives instructions on setting up to Break on Exception for a particular class of Exception http://msdn.microsoft.com/en-us/library/d14azbfh.aspx 

    Once broken, please can you capture the full stack trace info for each of the exceptions and send it to me at mwthomas at microsoft dot com?

    Thanks

    Mark


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Friday, July 16, 2010 7:24 PM
  • Callstacks sent.

     

     

    Monday, July 19, 2010 11:22 AM
  • Solution found: the signature was indeed invalid, because a postbuild step modified the EXE after it had been signed.

     

    Tuesday, July 20, 2010 3:36 PM
  • Thanks for letting us know, @qs7000. We are glad to hear you are back in working order.

    For others reading this thread: many root causes can lie behind intellisense failures in particular projects - anything that prevents the designer from loading the necessary information to populate intellisense can cause the problem. In @qs7000's case, the problem was caused by signing issues due to a postbuild step in his project (as he reported), which caused issues at design time but were not an issue at runtime.

    For info: the general debugging procedure when there are problems with intellisense (including namespace intellisense) in a specific project is:

    0. Verify that you don't see the problem with a fresh blank project (File....New...WPF Application or File....New....Silverlight Application). This isolates the behavior down to the particular project you are using.

    1. Attach a second instance of Visual Studio to the one showing the problem(making sure to turn "just my code" off in the global debugging settings first)

    2. Repeat the steps that would normally cause intellisense to show in the first instance of Visual Studio. Look at the output window in the second instance of VS for exceptions that show up when you do an action that would normally cause intellisense to show 

    3. Dig into the specific exceptions using "Break on Exception", and post a call stack here on the forum; we will take a look and attempt to help identify the root cause.

    Thanks

    Mark


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Tuesday, July 20, 2010 4:08 PM
  • Hi Mark,

    I am facing a similar issue and we are using clearcase for versioning hence all the Dll's refered are form a network drive.

    So i have three projects A.dll, B.dll and C.exe. C has a reference to B and B has a reference to A, all of them are WPF related dlls/exe. Now when i run C.exe i get an exception saying could not load reosurces from A.dll as A.dll was not found. When i add the reference of A.dll in my C.exe all worrks fine but that is not something i should have  to do as i am not directly using A.dll in my C.exe.

    Can you please help as we just migrated to VS 2010 and all our entire team is facing this issue which has become critical now.

    Thanks

    Zepher

     


    Zepher684
    Thursday, July 29, 2010 1:25 PM
  • Hi,

    It is a mistake on my part, my test application(A.dll) is not part of my pool from where its is refereing B.dll. My pool folder has both B.dlland C.dllbut my test application exe is not part of the pool. Also setting

    <loadFromRemoteSources enabled="true"/> helped.

    Thanks a lot !!

    Zepher


    Zepher684
    Friday, July 30, 2010 10:37 AM
  • Thanks for letting us know, @zepher684

    We're glad you're back in working order.

    Mark


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Friday, July 30, 2010 4:40 PM
  • I am in the same situation as GSyren and completely agree, but I am on XP so I cannot make symbolic links to the network drives. When will this bug be fixed?
    Wednesday, August 11, 2010 2:23 PM
  • My intellisense was lost on XMLNS today.  Attached a debugger per dircections above and the output window showed no exceptions other than the call to the extension for Spell Checker when typing in the editor.  The stack trace showed nothing... Disabling Spell checker did nothing...

    Is there are way to reset Intellisense to default settings?


    Javaman
    Thursday, September 30, 2010 7:57 PM
  • Started a new project intellisense is ok in that project...  Should I upload the failing project for review, or did I short circuit Instellisense somehow with the low-impact problem.
    Javaman
    Thursday, September 30, 2010 8:02 PM
  • What do you mean by "low-impact problem"? We don't support having any of your assemblies on a network share. Is that what you are referring to?
    Marco Goertz \ Sr. Dev Lead \ WPF/SL Designer "Cider" \ Microsoft
    Thursday, September 30, 2010 9:06 PM
    Owner
  • No there was a post about how to make intellisense follow "low-impact"  a control key sequence that hinders what it displays.  Perhaps, I was thinking, somehow I put it into this mode.  That's what I was referring to... Tx! Marco.
    Javaman
    Friday, October 01, 2010 1:41 AM
  • One other thing about this project, I have a Workflow included in it.
    Javaman
    Friday, October 01, 2010 1:43 AM
  • Sorry you are having an issue with IntelliSense.  We have seen very few issues with XAML IntelliSenses.

    This typically happens when Visual Studio can't resolve a type when its building the list of items for IntelliSense.

    Is this happening on a new project?

    Is this problem specific to a certain project?


    Cheers, Karl - Microsoft Cider Team, http://karlshifflett.wordpress.com/

    I find it interesting that you see "very few issues with XAML intellisense". I frequently encounter XAML intellisense issues; it's why google sent me to this page and why "XAML intellisense stopped working 2010" is one of the top "XAML intellisense" queries. I'm currently running into this in a Silverlight-based project. Any page that includes a XMLNS reference for a custom XmlnsDefinitionAttribute defined an a referenced assembly fails to display intellisense. I now have the tedious task of tracing down by elimination which particular type is causing the problem. This is a real productivity-killer. Either I forgo the use of intellisense or I spend the time to track down the problem; there should at least be a log that one can look at to help diagnose the problem!
    Thursday, December 16, 2010 5:01 PM
  • I have yet to see a satisfactory answer to this issue.  The same issue has been posed on many groups and, Mark, you've given the same unacceptable answer each time: go debug it yourself; we're not seeing the problem.  Since I am seeing many developers have the problem, it is disheartening that there still does not seem to be a solution...

    I am not using a network drive...

    This project is not implementing any Silverlight modules...

    This same project worked just fine in VS2008.  After it converted to VS2010, intellisense stopped working.  It's not us, the developer community who've paid big bucks to use VS2010, it's either the VS2010 conversion process, VS2010, or the VS2010 support team.  I would like to see an aswer to this posted ASAP...

    Wednesday, December 29, 2010 6:29 PM
  • I discovered that if the xaml file contains errors, intellisense stops working.  This behavior, I confirmed, changed since VS2008.

    If you add something that requires namespace qualification such as local:ResourceHelper.blah before you define the namespace local, the xaml editor loses its way.  If you define xmlns:local="whatever assembly" first, everything stays happy.

    This behavior is counter to how most developers work...add code, then add required references (I say it this way because in most cases, the reference is already defined...if you add something requiring a reference and then find it's not there, you can add it then...why should I always have to stop and confirm what I need is there ahead of time???)

    In any event, someone on the VS development team changed something and broke how the namespace intellisense worked...

    Thursday, December 30, 2010 6:54 PM
  • Yes....I do agree with you....

    For me also its stop working after i converted to VS2010. no idea where to start

     

    Wednesday, March 23, 2011 6:01 PM
  • Intellisense stops working randomly. I'm using VS 2010 Premium, SP1. In my scenario, there were no errors in the XAML beforehand. Dunno, can't pinpoint specific scenarios that make intellisense break; it just seems (of course it does not) to happen randomly. I have no add-ons installed.

    I have to restart VS in order to make it work again.

    Regards,

    Kasimier




    Sunday, April 24, 2011 8:28 PM
  • Thanks for letting us know, @qs7000. We are glad to hear you are back in working order.

    For others reading this thread: many root causes can lie behind intellisense failures in particular projects - anything that prevents the designer from loading the necessary information to populate intellisense can cause the problem. In @qs7000's case, the problem was caused by signing issues due to a postbuild step in his project (as he reported), which caused issues at design time but were not an issue at runtime.

    For info: the general debugging procedure when there are problems with intellisense (including namespace intellisense) in a specific project is:

    0. Verify that you don't see the problem with a fresh blank project (File....New...WPF Application or File....New....Silverlight Application). This isolates the behavior down to the particular project you are using.

    1. Attach a second instance of Visual Studio to the one showing the problem(making sure to turn "just my code" off in the global debugging settings first)

    2. Repeat the steps that would normally cause intellisense to show in the first instance of Visual Studio. Look at the output window in the second instance of VS for exceptions that show up when you do an action that would normally cause intellisense to show 

    3. Dig into the specific exceptions using "Break on Exception", and post a call stack here on the forum; we will take a look and attempt to help identify the root cause.

    Thanks

    Mark


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'

    Hi Mark, here is the exception I get by following your suggestions, please have a look. thanks!

     

    System.ArgumentException occurred
      Message=Cannot create an instance of System.Activities.XamlIntegration.ActivityWithResultConverter+ExpressionConverterHelper`1[System.Activities.Location`1[TResult]] because Type.ContainsGenericParameters is true.
      Source=mscorlib
      StackTrace:
           at System.RuntimeType.CreateInstanceCheckThis()
      InnerException: 

    Thursday, July 14, 2011 10:52 AM
  • I am getting the same error as of today. XMLNS intellisense is not working now. If I add a new project to the solution then it works again. I do have telerik installed and my project involves a large number of projects.

    Very frustrating at this point.

    Tuesday, July 19, 2011 5:07 PM
  • I was repeatedly losing intellisense in XAML editor in VS2010 until I found a solution in the following link:

    http://studioshorts.com/blog/2011/04/visual-studio-xaml-intellisense-not-working/

    It is very simple and strange!! I wanted to let the visitors of this thread know about it. Maybe it will be helpful to someone.

    When you add an xmlns like

    xmlns:foo="clr-namespace:Company.Product.Project.Something" it sometimes causes intellisense to stop working. When I rebuild the solution it works for sometime and stops working again. This is very annoying.

    You need to add ";assembly=" to the end. Like:

    xmlns:foo="clr-namespace:Company.Product.Project.Something;assembly="

    Now, intellisense works back again...what a joke! :)

    If I remove the ";assembly=", it stops working again!!

    I am interested to know if this will be helpful to any one else. Please write a note here to let the visitors of this thread know whether this workaround is useful for a particular scenario.


    Regards

    M.Afifi


    Regards M.Afifi
    • Proposed as answer by Shane Hancock Wednesday, December 14, 2011 2:15 AM
    Friday, September 09, 2011 9:58 PM
  • Thanks for letting us know, @qs7000. We are glad to hear you are back in working order.

    For others reading this thread: many root causes can lie behind intellisense failures in particular projects - anything that prevents the designer from loading the necessary information to populate intellisense can cause the problem. In @qs7000's case, the problem was caused by signing issues due to a postbuild step in his project (as he reported), which caused issues at design time but were not an issue at runtime.

    For info: the general debugging procedure when there are problems with intellisense (including namespace intellisense) in a specific project is:

    0. Verify that you don't see the problem with a fresh blank project (File....New...WPF Application or File....New....Silverlight Application). This isolates the behavior down to the particular project you are using.

    1. Attach a second instance of Visual Studio to the one showing the problem(making sure to turn "just my code" off in the global debugging settings first)

    2. Repeat the steps that would normally cause intellisense to show in the first instance of Visual Studio. Look at the output window in the second instance of VS for exceptions that show up when you do an action that would normally cause intellisense to show 

    3. Dig into the specific exceptions using "Break on Exception", and post a call stack here on the forum; we will take a look and attempt to help identify the root cause.

    Thanks

    Mark


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'

    Hi guys,

    I have simillar issues too. This happens randomly.
    My last PRISM project had this issue in one of the modules. Debugging methods described above showed that module is upset abt some missed files: "A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll"

    Deeper investigation showed that Microsoft.Practices.ServiceLocation.dll is missed - I don't use classes from that Lib, but somehow Intelisense wanted this file...

    Monday, September 19, 2011 2:43 PM
  • Thanks for post, definitely a joke.
    Javaman, Cowboy Coders Unite!
    Wednesday, September 21, 2011 2:57 PM
  • Hmmm. Original post was June 2010 and this is still happening out there?
    Javaman, Cowboy Coders Unite!
    Wednesday, September 21, 2011 3:00 PM
  • Possibly another solution.

    I have all my projects on network drive and after doing following steps, intellisense in VS.NET 2010 start working again.

    1. Set network folder into full trust:

    C:\Windows\Microsoft.NET\Framework64\v2.0.50727\caspol -m -ag 1.2 -url "\\.....\oleg\Projects\*" FullTrust
    C:\Windows\Microsoft.NET\Framework64\v2.0.50727\caspol -m -ag 1.2 -url H:\Projects\* FullTrust
    C:\Windows\Microsoft.NET\Framework\v2.0.50727\caspol -m -ag 1.2 -url "\\.....\oleg\Projects\*" FullTrust
    C:\Windows\Microsoft.NET\Framework\v2.0.50727\caspol -m -ag 1.2 -url H:\Projects\* FullTrust
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\caspol -m -ag 1.2 -url "\\.....\oleg\Projects\*" FullTrust
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\caspol -m -ag 1.2 -url H:\Projects\* FullTrust
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\caspol -m -ag 1.2 -url "\\...\oleg\Projects\*" FullTrust
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\caspol -m -ag 1.2 -url H:\Projects\* FullTrust

    2. Allow VS.NET 2010 to load assemblies from network drives:

    Modify devenv.exe.config file to add <loadFromRemoteSources enabled="true" /> under <runtime>.

     

    Hope it helps somebody.

     

    Thanks,

    Oleg

    • Proposed as answer by OlegKap Tuesday, September 27, 2011 2:15 PM
    Tuesday, September 27, 2011 2:15 PM
  • Possibly another solution.

    I have all my projects on network drive and after doing following steps, intellisense in VS.NET 2010 start working again.

    1. Set network folder into full trust:

    C:\Windows\Microsoft.NET\Framework64\v2.0.50727\caspol -m -ag 1.2 -url "\\.....\oleg\Projects\*" FullTrust
    C:\Windows\Microsoft.NET\Framework64\v2.0.50727\caspol -m -ag 1.2 -url H:\Projects\* FullTrust
    C:\Windows\Microsoft.NET\Framework\v2.0.50727\caspol -m -ag 1.2 -url "\\.....\oleg\Projects\*" FullTrust
    C:\Windows\Microsoft.NET\Framework\v2.0.50727\caspol -m -ag 1.2 -url H:\Projects\* FullTrust
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\caspol -m -ag 1.2 -url "\\.....\oleg\Projects\*" FullTrust
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\caspol -m -ag 1.2 -url H:\Projects\* FullTrust
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\caspol -m -ag 1.2 -url "\\...\oleg\Projects\*" FullTrust
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\caspol -m -ag 1.2 -url H:\Projects\* FullTrust

    2. Allow VS.NET 2010 to load assemblies from network drives:

    Modify devenv.exe.config file to add <loadFromRemoteSources enabled="true" /> under <runtime>.

     

    Hope it helps somebody.

     

    Thanks,

    Oleg


    Thanks for this Oleg!

    I've been searching the Tinter pipes all day and just tried your solution and it works perfectly :)

    Friday, October 07, 2011 2:57 PM
  • Thanks, after hours of trying to figure this out, this fixed it for me.

    Oddly enough, Intellisense was only failing for me when the assembly i was referencing in the xmlns contained any classes that inherited from System.Windows.Interactivity.Behavior. So, either Intellisense tries to do something different for Behaviors causing it to break, or perhaps it's because Behavior is a Generic class and Intellisense doesn't like Generics. Either way, it sucks.



    Wednesday, December 14, 2011 2:15 AM