Im trying to achieve hazelcast embedded architecture, on my local machine, so wrote two C# console apps, different processes(two vs instances). So my main goal is to first app write data, and second to read the same. My code look like bellow
ConsoleApp1(standard template) :
static void Main(string[] args)
{
var clientConfig = new ClientConfig();
clientConfig.GetNetworkConfig().AddAddress("127.0.0.1");
var sc = new SerializerConfig()
.SetImplementation(new CustomSerializer())
.SetTypeClass(typeof(Person));
//Custom Serialization setup up for Person Class.
clientConfig.GetSerializationConfig().AddSerializerConfig(sc);
IHazelcastInstance client = HazelcastClient.NewHazelcastClient(clientConfig);
//All cluster operations that you can do with ordinary HazelcastInstance
IMap<string, Person> mapCustomers = client.GetMap<string, Person>("persons");
mapCustomers.Put("1", new Person("Joe", "Smith"));
mapCustomers.Put("2", new Person("Ali", "Selam"));
mapCustomers.Put("3", new Person("Avi", "Noyan"));
ICollection<Person> persons = mapCustomers.Values();
foreach (var person in persons)
{
Console.WriteLine(person.ToString());
}
}
And Second
static void Main(string[] args)
{
var clientConfig = new ClientConfig();
clientConfig.GetNetworkConfig().AddAddress("127.0.0.1");
var sc = new SerializerConfig()
.SetImplementation(new CustomSerializer())
.SetTypeClass(typeof(Person));
clientConfig.GetSerializationConfig().AddSerializerConfig(sc);
IHazelcastInstance client = Hazelcast.Client.HazelcastClient.NewHazelcastClient(clientConfig);
IMap<string, Person> mapPersons = client.GetMap<string, Person>("persons");
Console.WriteLine(mapPersons.Size());
foreach (var person in mapPersons.Values() )
{
Console.WriteLine(person.Name);
}
}
When i run second app, i get error "Hazelcast.IO.Serialization.HazelcastSerializationException: 'Unable to find assembly 'ConsoleApp1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'."
How to setup this kind environment?
Thanks