I hope it is ok for me to post this email to this group. I am not an
active NAnt developer but I am familiar with the code. Here is a problem
that I encountered:

I use the NAnt.VSNet task to compile a solution consisting of a number
of projects that use various (licensed) Infragistics controls. While the
same solution builds fine in VisualStudio.Net 2003, the license task
fails when the solution is compiled with NAnt. It turns out that the
issue is the following line in the file LicenseTask.cs that is linked
into the NAnt.Win32 project:

                    // Now try to create the licensed component - this
gives us a license
                    try {
                        LicenseManager.CreateWithContext(tp, dlc);
                    }

Please note that the controls ARE licensed. The involved license file
licenses.licx holds the following content:
Infragistics.Win.UltraWinToolbars.UltraToolbarsManager,
Infragistics.Win.UltraWinToolbars.v2, Version=2.0.5000.22,
Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb


I isolated the problem down to this: You can execute the license task
against the license file successfully as long as only the assembly that
holds the type Infragistics.Win.UltraWinToolbars.UltraToolbarsManager is
loaded into the AppDomain. As soon as the assembly
Infragistics.Shared.v2.dll is also loaded into the AppDomain, the
license task fails with this error:

Failed to create license for type
Infragistics.Win.UltraWinToolbars.UltraToolbarsManager
License attribute not found

I helped myself by deleting the following code from the file
LicenseTask:

        // Now try to create the licensed component - this gives us a
license
        try {
                LicenseManager.CreateWithContext(tp, dlc);
        }
        catch (Exception e) {
                throw new
BuildException(String.Format(CultureInfo.InvariantCulture,  "Failed to
create license for type {0}", tp), Location, e);
        } 

I wonder whether this code should not officially be deleted from the
class. A design-time license is checked when a component is instantiated
at design time. During a pure build that is not the case. If this is not
acceptable then more work would be required in order to find out how an
additionally loaded assembly can affect how a given type reacts to the
LicenseManager.CreateWithContext(...) call.

Regards,
Rainer Hessmer



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to