Getting Visual Studio 2017 Community & Xamarin working

DarrellUKDarrellUK GBMember ✭✭

Hi all,

Where am I going wrong?

  1. Fresh install of Windows 10 Pro
  2. Connect to our corporate domain.
  3. Install Visual Studio Community 2017.
  4. File > New > Project - Templates, Visual C#, Cross-Platform, Cross Platform App (Xamarin.Forms or Native)
  5. Select Blank App, Xamarin.Forms, Portable Class Library (PCL). Click OK
  6. Creating project 'App10.....'
  7. For Universal Applications select the default. Target Version = Windows 10 Anniversary Update (10.0 14393), Minimum Version = Windows 10 (10.0 10586). Click OK

I see the following in the error list.


So far I have done the following (thanks to @slikvik) in this post https://forums.xamarin.com/discussion/91262/rant-how-have-ms-released-vs2017-without-a-working-xamarin-template-and-how-to-get-it-working#latest

  1. Tools > NuGetPackage Manager > Package Manager Console
  2. install-package Microsoft.NETCore.UniversalWindowsPlatform
  3. I see... Attempting to gather dependency information for package 'Microsoft.NETCore.UniversalWindowsPlatform.5.3.1' with respect to project 'App10.Android' etc...

I get the following errors at the end of this...

I have also done the following...

  1. Tools > Android > Android SDK Manager
  2. Installed all of API 25.

**Any help with any of the above much appreciated. **

By goal is to get the default template to compile, build and run - something it should do out of the box?

Thx, Darrell

Posts

  • DarrellUKDarrellUK GBMember ✭✭

    Also did the following (thanks to @slikvik )...

    1. Tools > NuGetPackage Manager > Package Manager Console
    2. Selected Default Project = App10.UWP
    3. install-package Microsoft.NETCore.UniversalWindowsPlatform

    That seems to have installed that now without the red errors.

    Thx, Darrell

  • DarrellUKDarrellUK GBMember ✭✭

    After the above, I am now down to...

    Getting there...!

  • DarrellUKDarrellUK GBMember ✭✭

    Creating a new app from the same template as above, I get the following error

  • DarrellUKDarrellUK GBMember ✭✭

    Purchased Visual Studio Enterprise. I can't believe it doesn't work with this too.

    Are there any step-by-step instructions for getting Xamarin to work on a fresh install?

  • the_Stigthe_Stig USMember

    @DarrellUK said:
    Are there any step-by-step instructions for getting Xamarin to work on a fresh install?

    Hi, I'm looking for the same step-by-step instructions including all Android SDK/Emulator settings.

    After installing Visual Studio 2017 Community + Xamarin via the Visual Studio Installer I had issues to start off with that I had Android v6 and needed v7. So installed:

    • Android SDK Tools 25.2.5
    • Android SDK Platform tools 25.0.4
    • Android SDK Build tools 25.0.2
    • All of Android 7.1.1 (API 25) components

    It's building on my machine but the "Run 5" KitKat(4.4) XXHDPI Phone (Android 4.4 - Api 19)" I get the following:

    1>------ Build started: Project: App001.Android, Configuration: Debug Any CPU ------
    1> Processing: obj\Debug\res\layout\tabbar.xml
    1> Processing: obj\Debug\res\layout\toolbar.xml
    1> Processing: obj\Debug\res\values\colors.xml
    1> Processing: obj\Debug\res\values\strings.xml
    1> Processing: obj\Debug\res\values\styles.xml
    1> App001.Android -> C:\Labs\App001\App001\App001.Android\bin\Debug\App001.Android.dll
    1> No way to resolve conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
    1> Processing: obj\Debug\res\layout\tabbar.xml
    1> Processing: obj\Debug\res\layout\toolbar.xml
    1> Processing: obj\Debug\res\values\colors.xml
    1> Processing: obj\Debug\res\values\strings.xml
    1> Processing: obj\Debug\res\values\styles.xml
    1> Processing: obj\Debug\res\layout\tabbar.xml
    1> Processing: obj\Debug\res\layout\toolbar.xml
    1> Processing: obj\Debug\res\values\colors.xml
    1> Processing: obj\Debug\res\values\strings.xml
    1> Processing: obj\Debug\res\values\styles.xml
    2>Starting deploy 5" KitKat (4.4) XXHDPI Phone ...
    2>Starting emulator 5" KitKat (4.4) XXHDPI Phone ...
    2>An error occured. See full exception on logs for more details.
    2>Object reference not set to an instance of an object.
    ========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

    Maybe I need to setup my own Android emulator that supports API 25 and not the default which has API 19 in the name?

    -Stig

  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    @DarrellUK

    Were you able to get up and running? I followed your original steps and got the warning mentioned, but a clean + build seemed to help and I was able to deploy to device. Hopefully this has been sorted, but let me know if otherwise. Thanks!

  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    @the_Stig

    2>An error occured. See full exception on logs for more details.
    2>Object reference not set to an instance of an object.

    The logs will have more specific information about why deployment failed; attaching them would be helpful to provide more insight into what’s happening. Perhaps additional SDK Platforms need to be installed? Which Android SDK packages should I install? and Debug on an Emulator are great resources for getting set up. I hope that helps!

Sign In or Register to comment.