Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CustomGenerator Errors in License Tracker

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
Renegade



Joined: 30 Apr 2005
Posts: 45

PostPosted: Thu Sep 08, 2011 2:46 pm    Post subject: CustomGenerator Errors in License Tracker Reply with quote

I'm having a heck of a time, and I can't figure out what I'm doing wrong.

My custom generator works. I've tested it and it works fine.

However, in License Tracker I keep getting this error:

http://imageshack.us/photo/my-images/33/screenshot2011090811160.png/



I've made sure that the namespace, class and DLL name are all correct. I've copied the DLL to about every folder possible. But the error won't go away.

Any idea what I'm doing wrong?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Sep 08, 2011 11:38 pm    Post subject: Reply with quote

What is the namespace qualified typename of your custom generator class?

What is the name of the assembly (DLL) that it is defined in?

The first part (before the comma) of the value you enter should be the namespace qualified typename. The second part should be the assembly name (without the .dll extension).

From the error it looks like you have entered "CustomGenerator.XXX.CustomGenerator" for the namespace qualified type name. Is that right? It would be a little unusual to define your customer generator this way ie

Code:
namespace  CustomGenerator.XXX
{
    public class CustomGenerator
   {
    ...
   }
}


If you are still having problems maybe try installing the sample custom generator project dll and check you can get it working according to the instructions.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Renegade



Joined: 30 Apr 2005
Posts: 45

PostPosted: Thu Sep 08, 2011 11:46 pm    Post subject: Reply with quote

The complete class is:

Code:

namespace CustomGenerator
{

   public class ACMECustomGenerator : Infralution.Licensing.ICustomGenerator
   {
        public void GetLicenseKeyData(CustomGeneratorData data, ICustomer customer, ISale sale)
        {
            // do stuff
        }

   }
}


The DLL name is:

ACMECustomGenerator.dll

I'm entering this into License Tracker:

CustomGenerator.ACMECustomGenerator, ACMECustomGenerator
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Sep 08, 2011 11:59 pm    Post subject: Reply with quote

The DLL must be put in the same directory as the LicenseTracker.exe.

Have you tried compiling and installing the sample Custom Generator project?

What version of Visual Studio are you using? What language? You need to ensure that the Target Framework for your custom generator project is set to ".NET Framework 2.0".
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Renegade



Joined: 30 Apr 2005
Posts: 45

PostPosted: Fri Sep 09, 2011 12:51 am    Post subject: Reply with quote

Infralution wrote:

The DLL must be put in the same directory as the LicenseTracker.exe.


It is. (I created a bin folder as well, and put it in the ../bin folder also, just for good measure.)

Infralution wrote:

Have you tried compiling and installing the sample Custom Generator project?


Yes. It works. Sad

CustomGenerator.MyGenerator,Generator


Infralution wrote:

What version of Visual Studio are you using? What language? You need to ensure that the Target Framework for your custom generator project is set to ".NET Framework 2.0".


2010
C#
Yes -- it's set for 2.0.



Anyways, I still have no clue as to why that is happening (it was working before), so I went ahead and just put my code in the sample project, and it worked. I simply copied, pasted, and removed the form and extra namespace references. (I had a BSOD thanks to wonderful Nvidia drivers, so perhaps something in the project became corrupt? I can't see how that would happen though as it still compiles fine and the DLL still works in IPN.NET.)

Life is full of mysteries...

Well, it's working now, so I'll just replace the old project I suppose.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Sep 09, 2011 1:54 am    Post subject: Reply with quote

Maybe do a diff on the old and new Visual Studio projects (they are just XML) to see if you can spot the difference.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Renegade



Joined: 30 Apr 2005
Posts: 45

PostPosted: Fri Sep 09, 2011 3:36 am    Post subject: Reply with quote

Infralution wrote:
Maybe do a diff on the old and new Visual Studio projects (they are just XML) to see if you can spot the difference.


I can see some differences in there. I'll need to get back to it later though as I have it working now and need to move on. I'll try to remember to post back with anything interesting just in case someone else encounters the same thing.
Back to top
View user's profile Send private message
Javier



Joined: 09 Oct 2009
Posts: 215

PostPosted: Fri Sep 09, 2011 4:29 pm    Post subject: Reply with quote

Quote:
You need to ensure that the Target Framework for your custom generator project is set to ".NET Framework 2.0".

Why does the target .NET Framework have to be 2.0? Doesn't ILS work for 3.0 or 3.5?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Sep 09, 2011 11:52 pm    Post subject: Reply with quote

Yes you can use ILS to license .NET 2.0, 3.0, 3.5 and 4.0 applications. The License Tracker app however is written, by default, to target .NET 2.0. This is because 99% of machines (and 100% of developer machines) will already have .NET 2.0 installed - so we aren't forcing you to download and install a new version of the .NET framework to use ILS.

Because the custom generator assembly is loaded into the domain of License Tracker it must be compatible with .NET framework that License Tracker uses. Actually .NET 3.0 and 3.5 would probably be OK since they are essentially .NET 2.0 with some extensions. .NET 4 is not compatible. Usually this would not be an issue as custom generators are generally fairly simple and so don't require features that are not available in .NET 2. If you really need to access .NET 4 functionality then it would be possible to change the config file for License Tracker to force it run using the .NET 4 Framework - then you could write your custom generator targeting .NET 4.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group