Getting XAML Intellisense to work VS 2017

Hi all,

I'm new to xamarin, have got everything to work except for the intellisense, it only works randomly or sometimes when I have already typed most of the code. I have looked through a previous post on this topic:
https://forums.xamarin.com/discussion/64005/intellisense-problem-in-visual-studio/p1

Which mentions something about if version at the topic of the xaml is in blue saying xml (which mine is) that it needs to be changed. The fix suggested about opening in source free editor for the solution I don't have as an available option.

I'm using visual studio 2017 with resharper. Any help will be appreciated.

Best Answer

Answers

  • toroidalgamestoroidalgames GBMember ✭✭

    bump - still need assistance please

  • toroidalgamestoroidalgames GBMember ✭✭

    bump - Anyone experienced and fixed this issue?

    Thanks

  • toroidalgamestoroidalgames GBMember ✭✭

    Last time I'm going to bump any info will be appreciated.

  • renzskarenzska USMember ✭✭

    I'm having the same issue. No intellisense whatsoever. Any help would be appreciated.

  • renzskarenzska USMember ✭✭

    So I got it working in a weird way, but not sure what the difference is.

    I made a copy of my xaml file. Then in VS 2017 I replace the content of the main file with the following:

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 x:Class="Temp">
    </ContentPage>
    

    The first line still showed blue, but then I saved the document, closed it, and re-opened it, and it showed as gray.

    I then copied in the xaml from the original copied xaml file (backup) into the file in VS that I replaced with the above text and it auto-formatted the document, had the first line as still gray, and intellisense started working.

  • toroidalgamestoroidalgames GBMember ✭✭

    Hi John thanks for the response, tried that still isn't working for me. I've pretty much given up on it and going to leave it till theres an update that hopefully fixes it unless another possible solution comes up for me to try.

  • FerranPlaza.8298FerranPlaza.8298 USMember
    edited May 2017

    Have you tried to Right click > Open with > Source code editor ?
    EDIT: Sorry, I see you have tried but don't see the option, that was my solution.

  • toroidalgamestoroidalgames GBMember ✭✭

    @FerranPlaza.8298 said:
    Have you tried to Right click > Open with > Source code editor ?
    EDIT: Sorry, I see you have tried but don't see the option, that was my solution.

    Hi Ferran thank you for the suggestion yeah I have tried and look into other posts suggesting it but for some reason I don't even have that as an available option

  • SousouSousou FRMember ✭✭

    Hi, same problem here, I'm just starting to learn Xamarin and it drives me crazy. I had Intellisense working at the beginning and now it comes and goes. I tried all the "open with" solutions, restarting, cleaning etc... The only thing that made it work was to switch to the Android Project in the listbox just under the tab name, once the xaml opened. With UWP project selected, it does not work.
    Hope it helps :smile:

  • KayoHamidKayoHamid USMember ✭✭

    Same problem... HELP, HELP, HELP...

  • SousouSousou FRMember ✭✭


    Did you try this ? Force the switch to Android, it works for me (VS2017). With UWP selected, I have no intellisense.

  • RaymondArvidssonRaymondArvidsson SEMember ✭✭

    Same problems. Acually, when I first create a new project and start typing - the intellisense is there, Close Visual Studio and open teh soultion again - the intellisense is gone. It DRIVES ME CRAZY!!

  • RaymondArvidssonRaymondArvidsson SEMember ✭✭

    I just removed the Android-project - Intellisense started to work. Did the same in my real project - didn´t help. ARG!!

  • codergrlcodergrl USUniversity

    Anyone has any other ideas? Switching the context to iOS helps restore some of the intellisense, but not all. I have a custom control I created, and I used to be able to see its properties in xaml intellisense. Then all of the sudden it stopped working.

  • ecoscomecoscom BRMember

    Same problem...

  • Davidx777Davidx777 USMember
    edited August 2017

    Not sure if I followed Pierce's instructions correctly, but it didn't work for me.

  • Davidx777Davidx777 USMember
    edited August 2017

    Rebuilding the new project seems to have fixed the intellisense problem for me. I had to fix my target/minimum android version before I could successfully rebuild. You may have to re-open the project after rebuilding. My guess is if your project (even new ones) has anything that will prevent it from successfully rebuilding, it will break intellisense.

  • vshahvshah USMember

    In my case, resharper was also preventing intellisense from working correctly.

  • 1xo21xo2 NZMember ✭✭

    same problem..

  • For everyone else that had tried previous solutions, and they didn't work -> In Solution explorer:
    1. Click "Show all files".
    2. Click "Exclude from project".
    3. Click "Include in project".
    This is so stupid.

  • NMackayNMackay GBInsider, University ✭✭✭✭✭

    @TomaziMaster776 said:
    For everyone else that had tried previous solutions, and they didn't work -> In Solution explorer:
    1. Click "Show all files".
    2. Click "Exclude from project".
    3. Click "Include in project".
    This is so stupid.

    Oh *!%[email protected] beep beep, I wouldn't have thought of that but guess what, it works. VS2017 15.5.3.....hate to see what the earlier ones were like.

  • jamoclejamocle USMember ✭✭

    Not working for me. Tried to exclude and include. To no avail. This is a real productivity buster! Any other ideas?

  • NigelFerrissey.8396NigelFerrissey.8396 NZMember
    edited February 25

    In case it helps someone else with ReSharper, I changed the RS settings to let Visual Studio handle intellisense for XAML files and it magically started working again.

    ReSharper -> Options -> Environment -> Intellisense -> General -> Custom Intellisense

  • NMackayNMackay GBInsider, University ✭✭✭✭✭

    @NigelFerrissey.8396 said:
    In case it helps someone else with ReSharper, I changed the RS settings to let Visual Studio handle intellisense for XAML files and it magically started working again.

    ReSharper -> Options -> Environment -> Intellisense -> General -> Custom Intellisense

    That's a step backwards though as resharper helps a lot with xaml namespaces, deprecated API's etc. The exclude and include option work again the other day for me.

  • @NMackay said:

    @NigelFerrissey.8396 said:
    In case it helps someone else with ReSharper, I changed the RS settings to let Visual Studio handle intellisense for XAML files and it magically started working again.

    ReSharper -> Options -> Environment -> Intellisense -> General -> Custom Intellisense

    That's a step backwards though as resharper helps a lot with xaml namespaces, deprecated API's etc. The exclude and include option work again the other day for me.

    Yeah totally agree, I just wanted something though. Are you using Shared files or .Net Standard/PCL?

  • NMackayNMackay GBInsider, University ✭✭✭✭✭

    Currently PCL, I'm playing about with .NETStandard in my home environment but for work we're stuck with PCL for now.

  • njayawanjayawa USMember ✭✭

    I can't believe this is still broken after 10 months!

  • toroidalgamestoroidalgames GBMember ✭✭

    Hi All thansk for replying to my post. I had a long break from programming due to working in other fields mainly digital marketing...Anyway I have gotten back into programming and yes it is a shame that this issue still hasn't been fixed?

  • JosephHarveyJosephHarvey USMember ✭✭

    @FerranPlaza.8298 said:
    Have you tried to Right click > Open with > Source code editor ?
    EDIT: Sorry, I see you have tried but don't see the option, that was my solution.

    This worked for me. Thanks for the reminder, I have had this issue in the past and this also helped then as well.

  • MarkZhukovskyMarkZhukovsky USMember ✭✭

    I don't have resharper. I don't have intellisense in XAML. Why is this happening?

  • john82john82 ITMember ✭✭
    edited April 1

    This issue is not solved at all!

    • No R#
    • New empty project

    The editor shows many XAML errors and no intellisense

  • AhmedAbubakarAhmedAbubakar USMember ✭✭

    @TomaziMaster776 said:
    For everyone else that had tried previous solutions, and they didn't work -> In Solution explorer:
    1. Click "Show all files".
    2. Click "Exclude from project".
    3. Click "Include in project".
    This is so stupid.

    It sounds stupid but works ....... thanks

  • ArtTheGreatArtTheGreat USMember ✭✭

    @NMackay said:

    @TomaziMaster776 said:
    For everyone else that had tried previous solutions, and they didn't work -> In Solution explorer:
    1. Click "Show all files".
    2. Click "Exclude from project".
    3. Click "Include in project".
    This is so stupid.

    Oh *!%[email protected] beep beep, I wouldn't have thought of that but guess what, it works. VS2017 15.5.3.....hate to see what the earlier ones were like.

    Agreed. This is kinda stupid. This worked for me as well. I ran into this problem with a brand new project.

  • WindyhenWindyhen USMember ✭✭

    @PierceBoggan I have tried all the above steps, none of them working :s
    I've used VS Win & VS Mac, interchangeably, this actually an ongoing issue as long as I remember using Xamarin -- but I didnt bother (cos I have deadlines to meet), would be nice and I mean real nice if this can be solved permanently.

  • PierceBogganPierceBoggan USForum Administrator, Xamarin Team, Developer Group Leader Xamurai

    @WindyHen What version of Visual Studio are you using? We adopted the same XAML editor that UWP and WPF use, so the IntelliSense should be much better in version 15.7:
    https://blog.xamarin.com/new-xamarin-forms-xaml-intellisense-visual-studio-2017/

  • WindyhenWindyhen USMember ✭✭

    @PierceBoggan said:
    @WindyHen What version of Visual Studio are you using? We adopted the same XAML editor that UWP and WPF use, so the IntelliSense should be much better in version 15.7:
    https://blog.xamarin.com/new-xamarin-forms-xaml-intellisense-visual-studio-2017/

    15.7 on windows, 7.5.1(build 22) on Mac. Is it because the file saving encoding lost during Mac/Win save?

  • PierceBogganPierceBoggan USForum Administrator, Xamarin Team, Developer Group Leader Xamurai

    @Windyhen said:

    @PierceBoggan said:
    @WindyHen What version of Visual Studio are you using? We adopted the same XAML editor that UWP and WPF use, so the IntelliSense should be much better in version 15.7:
    https://blog.xamarin.com/new-xamarin-forms-xaml-intellisense-visual-studio-2017/

    15.7 on windows, 7.5.1(build 22) on Mac. Is it because the file saving encoding lost during Mac/Win save?

    That actually isn't a bad guess, and would explain why I'm not hitting it on my projects. I'll follow up internally and see if we can reproduce it by working across Mac and Windows.

  • For me it worked after updating ReSharper to the latest version (2018.1.2 built on 2018-05-30).

Sign In or Register to comment.