0

I need Xamarin.Auth for my WindowsPhone project in Xamarin. There is an experimental branch on GitHub: https://github.com/xamarin/Xamarin.Auth.git

How do i add this as a reference to my project? I can't find any DLL?

Thanks in advance!

Pete
  • 4,746
  • 2
  • 15
  • 21

1 Answers1

1

From this page within the GitHub project here it does not look like this particular GitHub project has a WindowsPhone version as part of it.

On the official Xamarin.Auth component v1.2.3.1 here it looks like this is only available for iOS and Android at present.

The 'experimental' branch I think you require is here, which the src folder has a WindowsPhone version included.

If you download that, and include the Xamarin.Auth.WindowsPhone.csproj you will be able to compile it and consume once referenced.

Update 1:-

For the 'experimental' branch, downloading the source isn't enough to load the WindowsPhone project as it will complain about an Import statement being incorrect.

You need to manually edit the Xamarin.Auth.WindowsPhone.csproj and remove the line:-

<Import Project="..\packages\Microsoft.Bcl.Build.1.0.7\tools\Microsoft.Bcl.Build.targets" />

Also, the solution Xamarin.Auth.sln, doesn't include the WindowsPhone project by default.

Once you've done the previous change of removing the Import, you will be able to add the WindowsPhone project to the solution and it will load up without complaining.

When you do a compilation on the Xamarin.Auth.WindowsPhone project it will retrieve the latest Microsoft.BCL reference and restore it form NuGet and compile the project successfully for WindowsPhone.

You will then have your DLLs in the Bin folder that you can reference from your other project.

Pete
  • 4,746
  • 2
  • 15
  • 21
  • How do I compile the csproj and add as a reference for my project? – Mathisse De Strooper Feb 09 '16 at 15:16
  • Add the .csproj to your solution and compile it. Should it require any of the other projects you will need to add that in order to get it to successfully compile. Once you have done that, just add a project reference from your project to it and you will be able to use it. – Pete Feb 09 '16 at 15:18
  • When i try to add the .csproj to my solution i get this: https://www.dropbox.com/s/pd1vkxxzaf46jjx/screenshot.png?dl=0 – Mathisse De Strooper Feb 09 '16 at 15:26
  • They file isn't on github so it means i'm lost? – Mathisse De Strooper Feb 09 '16 at 15:32
  • Load the solution file from https://github.com/xamarin/Xamarin.Auth/tree/experimental-winphone/src . You will see a file called Xamarin.Auth.sln. That should have all these references for external libraries already reference and set up. – Pete Feb 09 '16 at 15:37
  • When i load that i don't see the windows phone project ... So can't compile there – Mathisse De Strooper Feb 09 '16 at 15:46
  • @MathisseDeStrooper There was issues in the project. I've posted an update (see Update 1) that describes what you need to do, to load it, and compile the WindowsPhone project successfully. – Pete Feb 09 '16 at 16:01