Forum Visual Studio

Having a horrible time getting VS Xamarin environment setup.

We've recently decided to develop a simple companion app for our website, and so I've been looking to Xamarin.

I've tried on two separate PC's, and on both I am at a complete loss on how to get xamarin working properly. I have VS 2015, I've tried installing via the VS install options, I've tried Nuget, and I've tried the separate xamarin installer.

When I look at the nuget packages it shows there's a newer stable release out there that I can't get to update through nuget, and xamarin installer claims I am current. I'm not sure what version is actually the latest.

Any time I open a brand new project, it already has a slew of errors ("XamlCTask" task failed unexpectely) and "Error encountered while loding the project. Some project features such as full solution analysis (....) have been disabled" usually) that change based on where I install xamarin from.

I'm wondering if someone can point to me to the definitive steps for installing xamarin for VS properly, and what versions are correct.

Thank you.

Posts

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    edited September 2016
    1. When you did the installation of VS15 did you choose to do a custom install, then tick all the boxes for Cross-Platform development (they aren't on by default)? If you've done that then Visual Studio will have all the components it needs.
    2. New solutions will use an older version of Xamarin.Forms by default. Silly we all agree, but it does. After you make the new solution, right-click on the solution in Solution Explorer and open the NuGet Package Manager for Solution. Then update the Xamarin.Forms package BUT NOT the Android support packages. They are dependencies and will update themselves as needed. Updating them manually is bad.
    3. I've also noticed that new solutions are not really loaded right, the first time - but only sometimes. After you've done all that, close the solution then reopen it so Visual Studio can go through its "Loading..." process for each project.
    4. Clean solution.
    5. Build each project in the solution one at a time from the top down. PCL, Android, iOS etc.
    6. Try to debug it to a real Android device.
  • Veyda92Veyda92 USMember

    @ClintStLaurent said:
    1. When you did the installation of VS15 did you choose to do a custom install, then tick all the boxes for Cross-Platform development (they aren't on by default)? If you've done that then Visual Studio will have all the components it needs.
    2. New solutions will use an older version of Xamarin.Forms by default. Silly we all agree, but it does. After you make the new solution, right-click on the solution in Solution Explorer and open the NuGet Package Manager for Solution. Then update the Xamarin.Forms package BUT NOT the Android support packages. They are dependencies and will update themselves as needed. Updating them manually is bad.

    1. I'm pretty sure I did, but I'll do a clean install and retry just in case.

    2. Thanks, that clears up most of the confusion then, I wasn't aware the dependencies would self-update.

  • Veyda92Veyda92 USMember

    @ClintStLaurent said:
    -snip-

    The VS install has The following checked under Cross Platform:
    C#/.net Xamarin
    MVS Emulator for Android
    Android Native Dev Kit R10E
    Android SDK, SDK Setup (API 19 and 21, API 23)
    Java SE Dev Kit

    Do I need anything other than those? Nothing really sticks out to me as being necessary for xamarin to function, but then again I'm pretty much flying blind at the moment.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    There is a node for "Universal Windows App Developmet Tools" - We just click everything in that. Better safe than sorry. Whats a few megs of disc space compared to hours of pulling your hair out?

  • Veyda92Veyda92 USMember
    edited September 2016

    @ClintStLaurent said:
    There is a node for "Universal Windows App Developmet Tools" - We just click everything in that. Better safe than sorry. Whats a few megs of disc space compared to hours of pulling your hair out?

    Odd, I'd figure that would only affect the Windows 10/UWP portion since the only things under it are 10 SDK's and the emulator. Everything in that was already installed except for the emulator. I added it anyway.

    But so I followed your clean, individual rebuild steps, and that actually cleared up most of it, and Android compiles and runs in the emulator now.

    There's two errors I can't seem to get rid of though (keep in mind this is a fresh, untouched project (Xamarin Forms Blank App))

    1. Severity Code Description Project File Line Suppression State Detail Description Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled. App1.Droid 1 Active To see what caused the issue, please try below. 1. Close Visual Studio 2. Open a Visual Studio Developer Command Prompt 3. Set environment variable “TraceDesignTime” to true (set TraceDesignTime=true) 4. Delete .vs directory/.suo file 5. Restart VS from the command prompt you set the environment varaible (devenv) 6. Open the solution 7. Check 'C:\Users-snip-\AppData\Local\Temp\App1.Droid_*.designtime.log' and look for the failed tasks (FAILED)

    I did this, and the log actually has zero instances of "FAILED" so I'm not sure what this error is about.

    1. An unexpected error occurred with the Android Designer. Please verify the Android SDK path and the JDK paths in tools > Options > Xamarin > Android Settings menu.

    The paths are correct and are fresh installs. So again, I'm not sure what the issue is. It doesn't seem to be affecting debug/compiling but it's still concerning to have warnings when I haven't even started development yet.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Its probably a sad statement on me, or on Xamarin, or both, but I don't worry about warning, especially if my code runs, is confirmed, etc. There is just so much in all of this that is picky, finicky, touchy, reports wrongly until you do a rebuild, reports wrongly unless you close and re-open the solution [...] I'd rather spend 3 hours coding or chasing a real bug than a phantom warning.

    But that's just me.

Sign In or Register to comment.