Does LibSpotify SDK crashes Unity3D?

The past few days im trying to integrate music streaming services (Spotify and Deezer) in Unity3D.
Starting with the libspotify SDK written in C for Win32:

But with no luck. I have tried different C# wrappers like libspotifydotnet and libspotify-sharp.
But all implementations ends with the same result, which is crashing Unity3D.

The following error occurs when using the libspotify-sharp wrapper (crashing unity):
alt text
But the libspotify.dll IS in the /Assets/plugins/ folder (path is also correct in the error message!).

Besides the wrapper, i also tried using the libspotify.dll in /Assets/plugins/ directly by creating a simple C# script which imports the libspotify.dll and mapped two functions with it according to the Unity plugins tutorial with the functions described in the documentation of libspotify like so:

using System;
using System.Runtime.InteropServices;
using UnityEngine;

public class TestSpotify : MonoBehaviour
{
        [DllImport ("libspotify")]
        public static extern string sp_error_message (sp_error error);

        [DllImport ("libspotify")]
        internal static extern sp_error sp_session_login (IntPtr sessionPtr, string username, string password);

        void Start ()
        {
                Debug.Log ("result of native lib is : " + sp_error_message (sp_error.OK));
        }

    #region Enums

        public enum sp_error
        {
                OK = 0,
                BAD_API_VERSION = 1,
                API_INITIALIZATION_FAILED = 2
        }

    #endregion
}

Is my approach wrong? (is the libspotify.dll at the wrong location or do i miss some .NET skills and insights?)
because this code also results in the DllNotFoundException.

And who succeeded with implementing the libspotify SDK anyway? because the total amount of information on the internet is like a fart in the wind… so, any unityproject would be very much appreciated :).

I’m using Unity3D pro and MonoDevelop as development environment.

Try downloading the latest dll from the linspotify site that seemed to work for me I’m also running 32 bit unity. Good luck!

DLLNotFoundException can often refer to the DLL’s dependancies.

Find Dependancy walker (http://www.dependencywalker.com/) and open libspotify.dll and see if there are any extra DLL’s it might need. These then need to be placed in the same place as your “plugin”'s DLL.

It could also be 32 vs 64 bit.

Try attaching the visual studio debugger to unity BEFORE the first attempt to load the plugin and it should give you some extra information (like the 32 vs 64 bit error)