Where do I put license info (.licx) in a .NET Core application?

DataAbstract v9.4.109.1377

I have created a .NET Core 2.1 class library. Using the libraries in the RemObjects>Data Abstract for .NET> .NETStandard folder. When I compile it I get the following error message:

.net core LicenseException: No valid license has been found for the type RemObjects.DataAbstract.BaseDataAdapter

I am not sure where to put the license file?

Thanks,
Todd

Hello

You need to add .licx to the ClassLibrary.

Here is how I did test that:

I’ve just created a simple .NET Core 2.1 project as follows:

1.Created a new .NET Core Console App
2.Added a .NET Core Class Library project to the solution
3.Added references to the .NETStandard assemblies
4.Added the following code to the Class Lib project:

using RemObjects.DataAbstract.Linq;

namespace ClassLibrary1
{
	public class DataModule
	{
		public DataModule()
		{
			this.DataAdapter = new LinqRemoteDataAdapter("http://localhost:8099/bin");
		}

		public LinqDataAdapter DataAdapter { get; }
	}
}

5.Added the licenses.licx file as EmbeddedResource to the ClassLibrary project with the following line in it:

RemObjects.DataAbstract.Linq.LinqRemoteDataAdapter, RemObjects.DataAbstract

6.Added a class lib reference to the console app project
7.Set console app code to

using System;

namespace ConsoleApp4
{
	static class Program
	{
		static void Main(string[] args)
		{
			try
			{
				var dataModule = new ClassLibrary1.DataModule();
				Console.WriteLine(dataModule.DataAdapter.GetType());
			}
			catch (Exception e)
			{
				Console.WriteLine(e);
			}
			Console.WriteLine("Done");
			Console.ReadLine();
		}
	}
}

8.Started the app and it was able to instantiate the Data Adapter

Hope that helps

It helps immensely.

Todd

CrossPost