Issues with .net library for SplitIO.
Nuget Link : https://www.nuget.org/packages/Splitio/
Hi Support,
Hope you are doing great, I need a help on following issue :
I have created a new console app in .net and installed latest version of splitio into it. And added sample code but when I start the app it gives following error on project start :
System.TypeLoadException
HResult=0x80131522
Message=Could not load type 'Splitio.Services.Client.Classes.ConfigurationOptions' from assembly 'SplitIO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Source=<Cannot evaluate the exception source>
StackTrace:
<Cannot evaluate the exception stack trace>
Not sure why its looking for Version=1.0.0.0 in project.
Also tried adding binding redirect in app config to redirect to correct version but its also not helping :
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Splitio" publicKeyToken="null" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0" newVersion="6.1.1.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Also tried adding library to GAC but there it gives error :
attempt to install an assembly without a strong name
Not sure what is exact cause for it.
Thanks in advance!
Priyank kotiyal
-
Hi following is code sample, I have debugger attached at first line but control doesn't come to it, it breaks even before that :
using System;
using System.Collections.Generic;
using Splitio.Services.Client.Classes;
using Splitio.Services.Client.Interfaces;
namespace SplitIO
{
class Program
{
static void Main(string[] args)
{
ConfigurationOptions config = new ConfigurationOptions();SplitFactory factory = new SplitFactory("jctg******", config);
ISplitClient splitClient = factory.Client();
try {
splitClient.BlockUntilReady(10000);
}
catch (Exception ex)
{
Console.WriteLine("Error");
}Dictionary<string, object> attributes = new Dictionary<string, object>();
attributes.Add("location", "India");var treatment = splitClient.GetTreatment("Priyank", // unique identifier for your user
"Google_Meet",
attributes);if (treatment == "on")
{
// insert on code here
}
else if (treatment == "off")
{
// insert off code here
}
else
{
// insert control code here
}
}
}
}
Please sign in to leave a comment.
Comments
5 comments