Visual Studio 2015 intellisense regression when editing XAML files

In Visual Studio 2013, editing XAML files has suggestions from intellisense, as shown in the image below. While not perfect, they usually worked.

But I don't seem to have the same functionality in VS 2015 (despite Xamarin being installed here and the project building perfectly fine). Not only is there no Xamarin-specific intellisense (just generic XML intellisense), but VS issues messages (which it flags as errors) like:

The type 'ContentPage' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.

Which also didn't happen in VS 2013.

Is VS 2015 officially supported? The installer seemed to imply it was and this is the only regression I've seen so far. This is on the RC version (14.0.22823.1) and with Xamarin for Visual Studio 3.11.666. This seems to be the most recent version.

Best Answers

«1

Answers

  • ylemsoulylemsoul RUMember ✭✭✭
    edited July 2015

    Same here. Intellisense doesn't work despite the mention in the release notes:

    Code Completion for Xamarin.Forms XAML
    Declarative UI development in Visual Studio gets even more powerful with code completion for Xamarin.Forms. You can easily explore Xamarin.Forms user interface APIs, quickly build complex screens, and avoid typos and other common mistakes while creating UIs in XAML.

  • DanielBuchererDanielBucherer SGMember

    Same problem here, too - would like to use Xamarin also from Visual Studio 2015...

  • Vinnie1991Vinnie1991 USMember ✭✭

    +1

  • me too...

  • DavidSpeakDavidSpeak GBUniversity ✭✭

    +1

  • Vinnie1991Vinnie1991 USMember ✭✭

    I'm now using Xamarin in VS2015, but I need to ignore the "Errors". Very annoying to program like this ;)

  • RuelDognidonRuelDognidon USUniversity ✭✭

    +1 Here

  • BenReiersonBenReierson AUUniversity

    My understanding was that VS2015 was changing the way xaml intellisense worked, but that support was targeted for RTM. It doesn't look like that's happened. I don't think I'll use VS2015 for Xamarin.Forms until this changes.

  • AndrewZaslowAndrewZaslow USUniversity

    No intellisense for me either in VS 2015.

  • Vinnie1991Vinnie1991 USMember ✭✭

    What is the ETA of the new Xamarin.Forms Nuget package? (Or is it already in Alpha/Beta?)

  • ErosSteinErosStein BRMember

    +1 I can't program like this...
    What is the ETA, please?

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    If everything goes smoothly with some remaining open bugs, I believe the Xamarin.Forms team's current objective is to upload a new pre-release that includes the Intellisense dependencies on Monday July 27. Again, there are some open bugs that need to be resolved first, so this estimate is still subject to change.

  • ErosSteinErosStein BRMember

    @BrendanZagaeski Alright, I'm eagerly waiting for that pre-release! Thanks.

  • opiantsopiants NZMember ✭✭

    @VGA I followed the readme file but it doesn't work for me. I'm using VS2015 rtm.

    How does these get picked up by visual studio? Do I need to do something special in my xaml files?

  • ErosSteinErosStein BRMember
    edited July 2015

    @VGA thanks, it worked :) goodbye blue lines of hell!
    @opiants Are you sure you followed the readme? All I did was close VS15 (I'm also on RTM), then I went to my project's folder/packages/xamarin forms 1.4.3/lib and copied those DLLs to every single folder there. After that I just started VS and it was all good! Try to do the process the way I did.

    Good luck!

  • opiantsopiants NZMember ✭✭
    edited July 2015

    @EroStein Yes, I did. Did you add it in the Design folder?

    EDIT: Tried on another computer but still can't get it to work. I'm not sure what I'm missing here. How does VS pick this dlls up for intellisense anyway?

  • zebra-brzebra-br USUniversity ✭✭

    opiants
    Having the same problem. Copied according to instructions but no intellisense
    Tried with Xamarin.Forms 1.4.4.6376 & 1.4.4.6379-pre3 with the following IDE setup:
    Microsoft Visual Studio Professional 2015 RC
    Version 14.0.22823.1 D14REL
    Installed Version: Professional

    Xamarin 3.11.666.0 (ebae43a)
    Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

    Xamarin.Android 5.1.4.16 (5f55a9ef61c11b6ce0890bc91e4c71b1b92be214)
    Visual Studio plugin to enable development for Xamarin.Android.

    Xamarin.iOS 8.10.2.0 (67b390d0d1bd741582cf7b7fd3ffea08583a3f83)
    Visual Studio extension to enable development for Xamarin.iOS.

  • ErosSteinErosStein BRMember

    @opiants Weird, all I did was follow the instructions and it worked.
    Maybe it's your forms version? I'm using Xamarin.Forms.1.4.3.6376. As I said, I closed my VS, copied those DLLs to "MyProjFolder\packages\Xamarin.Forms.1.4.3.6376\lib" and inside every folder I copied those 2 .Design DLLs. That's it, reopened the project and voila... no more blue lines from hell :)

  • ErosSteinErosStein BRMember

    @opiants One thing that just slipped my mind... do you still get the blue lines or your only problem is IntelliSense? I'm asking because I have ReSharper... so I might not be the best help to let you if the IntelliSense worked. What I can tell you is that now the XAML files are able to find the references and recognize the objects. That's why I think IS should be working as well.

  • opiantsopiants NZMember ✭✭
    edited July 2015

    @ErosStein Ahh. so you have Resharper installed? That's probably why you're getting intellisense, no? I'm on the same forms version as you.

  • ErosSteinErosStein BRMember
    edited July 2015

    @opiants Yup, that's why I asked about the blue lines... because those appear even with ReSharper before running the fix.

  • opiantsopiants NZMember ✭✭

    @JamesMontemagno That actually worked! Thanks!

    Does anyone know how this work though?

  • jonathanyatesjonathanyates GBMember ✭✭✭

    This does not work for me (so please marked as not answered). I am using latest XF update 1.4.4 (.6387) and I get blue lines all over my xaml in VS 2015. Applying the suggested fix (copying the two dlls to the XF 1.4.4 packages folder) does not work. This is very irritating.

    Can someone please advise when this will be fixed?

  • DavidSpeakDavidSpeak GBUniversity ✭✭

    @jonathanyates Same here.

    Can work around it for now (temporarily using ReSharper trial for XAML intellisense but only 20 days left!) but the intellisense errors are a pita. Can this be expedited please Xamarin folks?

  • opiantsopiants NZMember ✭✭
    edited July 2015

    @VGA intellisense doesn't seem to work if the root page is not from Xamarin.Forms assembly.

    e.g.

    <c:BaseView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:c="clr-namespace:SomeAssembly.Forms.Controls;assembly=SomeAssembly.Forms" x:Class="App1.Forms.Page1"> <Label Text="Test" /> </c:BaseView>

    where BaseView is inheriting ContentPage

    Any workaround?

  • ErosSteinErosStein BRMember
    edited July 2015

    Well, I decided to push my luck and updated to w10, now it's not working anymore, not even with the workaround...
    @JamesMontemagno @BrendanZagaeski @VGA

  • ErosSteinErosStein BRMember
    edited July 2015

    @jonathanyates @Marabunta Well, I had this same issue again, after installing W10 (see message above), but after upgrading to XF1.4.4, copying the DLLs again (of course) and running a clean/rebuild worked :) without resharper... I haven't installed it yet (it's a fresh W10 installation).

    Not only the BLOD are gone but now IS is working even without resharper, which is great... Imma give it a try and see if I can live without the decompiler :)

    check the image

  • opiantsopiants NZMember ✭✭
    edited July 2015

    From my previous post, figured out that the fix is simply pasting the default xaml scaffold in the file you're working on, close it then reopen, then paste the original content of the xaml file and intellisense should work again.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    @ErosStein I don't what the magic as for it to work for you. It definitely does not work for me. This is a clean install of W10 and VS2015 using XF 1.4.4.6387. Still blue lines all over my xaml :(

    Interestingly the 2 dlls are version 1.4.3.

  • ErosSteinErosStein BRMember

    @jonathanyates Indeed they are, but it's working... Well, all I did was update to forms 1.4.4, add those dlls to the package and restart VS, that was it. Not sure if it matters (it shouldn't), but I'm using VS15 Enterprise.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    I actually have a worse issue as well. My code is littered with reported errors with red underlining although the solution builds fine. The offending errors are all related to anything that I am referencing from my Core shared PCL. For example I have a PCL named Weather specific to my app and a PCL named Core for all my Core stuff. Weather references Core and uses it's classes. All builds and runs fine but the code is underlined in Red for any referenced Core stuff including usings, classes and members. I tried removing and adding the reference again which seemed to fix things temporarily, but not for long. My code is now riddled with Red underlining in my code and Blue underlining in my Xaml. See attached screenshot

    Anyone else experiencing this and know how to fix it?

  • jonathanyatesjonathanyates GBMember ✭✭✭

    The other thing I've noticed is that sometimes the blue xaml underlining goes away, until you edit the xaml and then it comes back again.

  • DavidSpeakDavidSpeak GBUniversity ✭✭

    @VGA @jonathanyates Exactly what I'm getting. Have tried all the workarounds, some work for a while, some don't. Using VS2015 Enterprise, filter the Error List to "Build Only" get no errors, but change to "Build + Intellisense" get 1200 errors, which are the references to my external PCL libraries. It still builds and runs Ok but is a pain to use. Also only get intellisense when trying @opiants workaround to empty the xaml, save it, reload it and paste in the xaml! Have to do this every time in order to see intellisense though so not really practical - thanks anyway though opiants :-)

    Have also created a new vanilla PCL project and problems are the same.

    Looks like some problem with the .g.cs file generation at design time maybe, but have to get on with my app for now - any ideas from Xamarin?

  • ErosSteinErosStein BRMember

    @jonathanyates believe me, I feel your pain! I have to unload and reload the WP project several times a day in order for those errors to go away. The project still builds and runs, but it's annoying... Xamarin is awesome, but sometimes it looks like they are still in beta...

  • ErosSteinErosStein BRMember

    @jonathanyates In time... As I said, I've been suffering with those errors since I started my project and what I do is unload and reload the WP project. If you're not targeting WP you might try this trick with other projects as well, maybe it'll help...

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Well, I'm glad it not just me cos I feel a bit crippled at the moment. Nor can I run my app on my iPhone either. No valid iOS code signing keys found in keychain :( Beginning to wonder why I went down this Xamarin road.

This discussion has been closed.