Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000239ILNumerics[All Projects] Bugspublic2016-09-27 12:172018-05-26 21:52
Assigned Toho 
StatusclosedResolutionno change required 
PlatformOSOS Version
Summary0000239: Cannot create array
I investigate ILNumerics and cannot create simple array (see details below)

test's source:

using ILNumerics;
using NUnit.Framework;

namespace ILNumericsTests
    public class ILArraysTests
        public void CreateILArray()
            ILNumericsSample sample = new ILNumericsSample();

    public class ILNumericsSample : ILMath
        public void CreateArray()
            ILArray<double> A = rand(10, 20);
            ILArray<double> B = A * 30 + 100;
            ILLogical C = any(multiply(B, B.T));


System.TypeInitializationException : The type initializer for 'ILNumerics.ILMath' threw an exception.
  ----> System.ComponentModel.LicenseException : Error retrieving embedded licenses from assembly resources. Assembly: ILNumericsTests, Version=, Culture=neutral, PublicKeyToken=null
  ----> System.Runtime.Serialization.SerializationException : Attempting to deserialize an empty stream.
   at ILNumerics.ILMath..ctor()
   at ILNumericsTests.ILNumericsSample..ctor()
   at ILNumericsTests.ILArraysTests.CreateILArray() in d:\My\@gh\TechSugar\MathLab\ILNumericsIntro\ILNumericsTests\ILArraysTests.cs:line 12
   at ILNumerics.Licensing.ILLicenseManager.GetLicensesFromAssembly(Assembly assembly, IEnumerable`1& licenses)
   at ILNumerics.Licensing.ILLicenseManager.VerifyAssembly(Assembly assembly)
   at ILNumerics.Licensing.ILLicenseManager.VerifyAssemblies()
   at ILNumerics.Licensing.ILLicenseManager.get_AppDomainIsVerified()
   at ILNumerics.Licensing.ILLicenseProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
   at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
   at System.ComponentModel.LicenseManager.Validate(Type type)
   at ILNumerics.ILMath..cctor()
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at ILNumerics.Licensing.ILLicenseManager.GetLicensesFromAssembly(Assembly assembly, IEnumerable`1& licenses)

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
ho (administrator)
2016-09-27 12:30

we do not use Nunit here, sadly. Please add an example without it. A plain ConsoleApplication will do. Thanks
constructor (reporter)
2016-09-27 12:53

same error in console application

class Program: ILMath
   static void Main(string[] args)
      ILArraySample sample = new ILArraySample();

sample can be found in solution [^]
constructor (reporter)
2016-09-27 12:54

pay attention, we use nunit and I am not sure if will start to use tools not supported nunit
ho (administrator)
2018-05-26 21:50
edited on: 2018-05-26 21:54

This is likely not a bug.
* ILNumerics automatically creates and embeds a license file into your project. The license file is updated with every build and always reflects the current state of your project. Potentially, technologies which change /instrument your assembly after build may render the embedded license invalid. Afterwards, such changed assemblies will not run _on non-licensed machines_. However, they will keep working on your licensed developer seat (user account). This should not be an issue, though, since one commonly does not deploy instrumented assemblies.
* Don't give your assembly a name starting with 'ILNumerics...'! This may confuse the licensing and seems to be the reason for this issue.

ho (administrator)
2018-05-26 21:52

Don't use names starting with 'ILNumerics..' as your assembly name.

- Issue History
Date Modified Username Field Change
2016-09-27 12:17 constructor New Issue
2016-09-27 12:30 ho Note Added: 0000248
2016-09-27 12:30 ho Assigned To => ho
2016-09-27 12:30 ho Status new => feedback
2016-09-27 12:53 constructor Note Added: 0000251
2016-09-27 12:53 constructor Status feedback => assigned
2016-09-27 12:54 constructor Note Added: 0000252
2018-05-26 21:50 ho Note Added: 0000274
2018-05-26 21:52 ho Note Added: 0000275
2018-05-26 21:52 ho Status assigned => closed
2018-05-26 21:52 ho Resolution open => no change required
2018-05-26 21:54 ho Note Edited: 0000274 View Revisions

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker