NLua (Safe) in PCL

I've recently come across NLua and I am interested in using it to run Lua scripts that interact with my C# classes and vice-versa. In my case, I don't need my Lua scripts to interact with any platform-specific code, just some C# classes in a PCL. So I looked up NLua in NuGet in the hopes of adding it to my PCL and found the NLua (Safe) package, which seems like the right choice since it says "This package is pure IL (pure C#) version of NLua...". When I try to add the package to my PCL project I get the following error:

Adding NLua_Safe...
Adding 'NLua_Safe 1.3.2.1' to Core.
Could not install package 'NLua_Safe 1.3.2.1'. You are trying to install this package into a project that targets 'portable-net45+win+wp80+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Am I doing something wrong? Is it not possible to add NLua to a PCL? I am running the latest stable Xamarin Studio (version 5.7).

Thanks,
Cam

Posts

  • mattwardmattward GBMember Xamurai

    Unfortunately NLua_Safe does not seem to contain any PCL assemblies. It has assemblies for:

    • .NET 3.0
    • .NET 4.0
    • .NET 4.5
  • PaulMace.0768PaulMace.0768 USMember ✭✭

    I'm getting this on zeroconf and other PCL packages. I suspect they are not compatible with the new unified assemblies.

  • mattwardmattward GBMember Xamurai

    zeroconf includes assemblies for Xamarin.iOS but the PCL assemblies target Windows 8.1 as part of their profiles so the profile for your project would need to be compatible with one of the following:

    portable-net45+wp8+win81+wpa81+monoandroid+monotouch+xamarin.ios
    portable-win81+wpa81
    
Sign In or Register to comment.