[RANT] How have MS released VS2017 without a working Xamarin template! (..and how to get it working)

slikvikslikvik GBMember

I've now tried this on 3 separate clean Windows 10, VS2017 installs and I can't believe this has got through testing and into the actual release. I don't think it's too unreasonable to expect that a new Xamarin Forms project should build without errors before you even start work on it!

It's not even one issue, but many. Here's what happens:

Create a new cross platform app as normal:

You immediately get this error:

Apparently this is a known bug and will be fixed likely months from now in the first VS Update. A workaround is in that link (although I'd like to know what it's actually doing).

You then get this lovely list of errors:

Ignore the first two for a moment. The third warning is a binding issue which is resolved by double clicking the warning. Not sure what this is doing and if it causes issues later in development.

The other errors are because the Android SDK that's JUST BEEN INSTALLED BY VS2017 ITSELF, doesn't match the Android version of the VS2017 TEMPLATE. This is fixed by loading the SDK manager and installing the SDK Platform for API 25.

You then get another, NEW, error:

This was fixed by going into Nuget Manager of the solution and ticking Xamarin Forms for the UWP project, which for some unknown reason doesn't have it!

I'm a long time C# dev but new to Xamarin . It's really a poor show to not have this work out the box when you're not sure what you're doing as it is. Not to mention the evenings I've wasted getting it all working before I even get to the point of starting development.

Posts

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai
    edited March 2017

    @slikvik,

    I'm really sorry for the poor experience and the wasted evening you had. I can totally understand that frustration. I don't have the details on the why. However, I can share with you that we are aware of these issues and bugs are filed and a fix is ready for the next release, as you found already. The team has planned on some different strategies for future templates to avoid issues like this. Please let me know if you run into anything else that I could help with to avoid any further lost time.

  • slikvikslikvik GBMember

    Thanks for the response John. I hope my post was constructive in that it shows a vanilla A to B process from a clean install and not just a "rant".

  • mallanmallan USMember
    edited March 2017

    I've read through a few posts which I think are related..
    There seems to be less and less reason to post here.
    Thank you,
    Mark

  • DarrellUKDarrellUK GBMember ✭✭

    This was the same with Visual Studio 2015. Haven't been able to get going yet. There should be a sticky link as the very first forum entry - how to get Visual Studio 2017 and Xamarin to work out of the box. I hope that someone will actually do this.

  • slikvikslikvik GBMember

    My original post does in fact show how to get things working but essentially do the following:

    Run "Install-Package Microsoft.NETCore.UniversalWindowsPlatform" on the UWP project in the package manager console.
    Double click on the "Found conflicts" error.
    Load the Android SDK manager and install the SDK Platform for API 25.
    Load Nuget Manager of the solution, tick Xamarin Forms for the UWP project and click install.

    That gets a clean solution building and working fine!

  • DarrellUKDarrellUK GBMember ✭✭

    I see the following after doing the install-package Microsoft.NETCore.UniversalWindowsPlatform...

    Not sure where I look to see this error "Double click on the "Found conflicts" error." in your next step.

    Install-Package: Could not install package 'Microsoft.NETCore.Jit 1.0.3'. You are trying to install this package into a project that targets
    'MonoAndroid,Version=v7.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information,
    contact the package author.
    At line:1 char:1

    • Install-Package Microsoft.NETCore.UniversalWindowsPlatform
    • ~~~~~~~~~~~~~~
      • CategoryInfo : NotSpecified: (:) [Install-Package], Exception
      • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
  • slikvikslikvik GBMember

    Hi @DarrellUK Make sure you have the UWP project selected in the drop down box of the package manager console (just above where you type the command).

    The "Double click" error is the third yellow exclamation mark item in my original post (the one that starts "Found conflicts..."). You simply double click that actual message and it will add the bindings to the config file for you.

    Hope that helps.

  • DarrellUKDarrellUK GBMember ✭✭

    Can't get this to work. Purchased Visual Studio 2017 Enterprise and it's the same. Doesn't work.

    Can't find any document "Visual Studio 2017 and Xamarin doesn't work out-of-the box so here is what you need to do" from Microsoft or Xamarin. Do they know?

  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    @DarrellUK I found a separate thread you posted, which appears to have slightly different issues related to getting started. I'll follow up with you there shortly.

Sign In or Register to comment.