New Xamarin.Forms XAML IntelliSense in Visual Studio 2017

PierceBogganPierceBoggan USForum Administrator, Xamarin Team, Developer Group Leader Xamurai
edited April 2018 in General


  • BradChase.2654BradChase.2654 USMember ✭✭✭

    This is awesome! Can I ask what changes had to be made on the Xamarin.Forms side? I cant seem to find what commits had the changes? Also did they need to change anything in VS 2017 to have this work or mainly on the X.F side? Basically does this change in VS 2017 only apply to X.F or can any form of XAML now start using the intellisense?

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

    @BradChase.2654 We only had to make some minor changes on the Xamarin.Forms side, like PR #2224..

    The only fundamental changes that were really required was to extend the XAML editor for UWP/WPF to support Xamarin.Forms.

  • BradChase.2654BradChase.2654 USMember ✭✭✭

    @PierceBoggan Very interesting. We are on a custom branch of Forms currently. Do we need to copy the design dlls anywhere after we rebuild them? Is it like the old intellisense where we just have either a Design folder or the same library with *.Design in the name and put it in the nuget build?

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

    @BradChase.2654 It should just work. Let me know if it does not.

  • BradChase.2654BradChase.2654 USMember ✭✭✭

    @PierceBoggan Hmm, nope it doesnt work for me under the new VS 2017 preview. My local namespaces are fine as usual, but not the Xamarin.Forms ones under the XmlnsDefinition of "" unfortunately. What I did was copy the Xamarin.Forms.Core.Design dll over into all of my nuget folders where Xamarin.Forms.Core.dll existed... Is there something else I need to do?

    Again we build our nuget packages ourselves with a modified batch file.

  • BradChase.2654BradChase.2654 USMember ✭✭✭
    edited April 2018

    @PierceBoggan So I reset all my VS settings, if I set them to C++ which is what I have always used since switching from Borland I cant even load our solution. If I switch to the C# default settings I can load the solution now in the latest preview. I also rebuilt the nuget package with the Design dlls in the Design folder(Xamarin's default) and still no cigar. Any other ideas on how to get intellisense working?

    I also thought, well maybe its because all our XAML is in shared projects, but I tried adding directly and still nothing.

    EDIT: Ughh cant load the solution anymore no matter how many times I reset my settings. VS has gone to shit.

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

    @BradChase.2654 We have identified a bug where the new XAML IntelliSense may not work with shared projects. We have fixed this for Preview 4.

  • BradChase.2654BradChase.2654 USMember ✭✭✭
    edited April 2018

    @PierceBoggan Thanks much. I managed to get it working on the current release VS 2017. I modified the nuget build for our branch of X.F. I saw a bug was opened in github with the exact same issue, so I am sure it will work after that. Unfortunately I cannot run the preview version of VS 2017 because it locks up trying to load any of our solutions. Not only that but we cant even perform a clean without it locking up. At this point VS 2017 release is working if we dont clean solutions so we just manually delete the bin and obj directories. BUT we do have intellisense, so thats a great start! Thanks much!

    EDIT: On a side note, I wanted to check in to see if intellisense will work eventually when you are referencing the project instead of the assembly? On my XAML engine it only works when you reference the assembly AND the project is not in the current solution. The minute the project is removed, intellisense starts working again.

  • TomAugaTomAuga USMember ✭✭

    I installed the update to 15.7.1 release and intellisense for XAML property values has stopped working. Tested this with a Xamarin Forms project. I've tried using other editors using Open With but nothing works. I will note that the default editor for a .XAML file was set to "Automatic Editor Selector (XML)" which seems wrong.

    I get intellisense for property names (ie VerticalOptions) but not the property value (ie Center or Fill etc).

    Also I get the green warning line (forget the name) under FontSize="Large" or any value besides a number. Further, sometimes when compiling i actually get a compile error:

    XLS0431 Invalid value for property 'FontSize': 'Large'  

    A recompile and the compile error goes away along with the green warning. But make a change in the XAML and green warning comes back.

    I dont see any intellisense settings for XAML files.

    Any ideas?

  • EternalBardEternalBard BRBeta ✭✭

    Is there a plan to make it work with Prism?

    To have this intellisense we need a "public MainPageViewModel()", but with prism we always have a "public MainPageViewModel(INavigationService navigationService /and many other things/)". So, no Intellisense from ViewModels with Prism.

  • RodrigoJuarez.1796RodrigoJuarez.1796 USMember ✭✭

    @PierceBoggan nice job!

    The Binding Context intellisense should work for ListViews?

Sign In or Register to comment.