3

It's not obvious me how to incorporate .net core and .net standard into a blank xamarin xaml forms app. Can someone please step me through it?

Do this, start Visual Studio 2015, Create a Visual C# / Cross-Platform / Blank Xaml App (Xamarin.Forms Portable) project. Once that completes, integrate .Net Core and .Net Standard

Athari
  • 33,702
  • 16
  • 105
  • 146
Sean
  • 2,531
  • 2
  • 17
  • 17

2 Answers2

1

Totally plagiarized from http://motzcod.es/, but put here since I get tagged if I just link to content. Sorry James...

Links on migrating from DNX to .NET Core CLI - https://learn.microsoft.com/en-us/dotnet/articles/core/migrating-from-dnx

After your upgrade a PCL to netstandard you will get a project.json such as this:

{
    "supports": {},
    "dependencies": {
    "Microsoft.NETCore.Portable.Compatibility": "1.0.1",
    "NETStandard.Library": "1.6.0"
},
"frameworks": {
    "netstandard1.4": {}
    }
}

Now, all we need to do is add a special “imports” flag and the PCLs we would like to consume under the netstandard profile

{
    "supports": {},
    "dependencies": {
    "Microsoft.NETCore.Portable.Compatibility": "1.0.1",
    "NETStandard.Library": "1.6.0"
  },
  "frameworks": {
    "netstandard1.4": {
      "imports": [
        "portable-net45+wp80+win8+wpa81"]
   }
  }
}

That little imports flag essentially tells NuGet that this package will totally work with PCLs that support this. Now you should be good to go to install any PCL NuGet that you would like:

enter image description here

Again, directly plagiarized from James Montemagno at http://motzcod.es/ . Full credit to the author.

Joe Healy
  • 5,769
  • 3
  • 38
  • 56
  • I'm not looking to migrate anything so I don't think this helps at all. I'll update the question to be more specific – Sean Aug 19 '16 at 17:50
  • 1
    start a new blank project, then migrate it. been on my list to figure out how to create xam visx for a better projects straight out of the ide. not enough hours in the day. – Joe Healy Aug 19 '16 at 18:29
0

This was the answer I was looking for

https://xamarinhelp.com/dot-net-standard-pcl-xamarin-forms/

Sean
  • 2,531
  • 2
  • 17
  • 17