Hello,
I am using the <solution> task to build my nant
project. I am using a 3rd party gui library (syncfusion) which uses
a .licx file. The project references a copy of the 3rd party dlls in a
sub folder of the project. The license file causes an exception to be
thrown within nant. The error message reads:
BUILD FAILED
INTERNAL ERROR
System.Runtime.Serialization.SerializationException: The type
NAnt.C
ore.Tasks.IfNotTask in Assembly NAnt.Core, Version=0.85.1525.0,
Culture=neutral,
PublicKeyToken=null is not marked as
serializable.
Server stack
trace:
at
System.Runtime.Serialization.FormatterServices.InternalGetSeri
alizableMembers(RuntimeType
type, Boolean
excludeNonSerializable)
at
System.Runtime.Serialization.FormatterServices.GetSerializable
Members(Type
type, StreamingContext
context)
at
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo
.InitMemberInfo()
at
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo
.InitSerialize(Object
obj, ISurrogateSelector surrogateSelector, StreamingContex
t context,
SerObjectInfoInit serObjectInfoInit, IFormatterConverter
converter)
at
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo
.Serialize(Object
obj, ISurrogateSelector surrogateSelector, StreamingContext co
ntext,
SerObjectInfoInit serObjectInfoInit, IFormatterConverter
converter)
at
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Wr
ite(WriteObjectInfo
objectInfo, NameInfo memberNameInfo, NameInfo
typeNameInfo)
at
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Se
rialize(Object
graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean
fChe
ck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
.S
erialize(Stream serializationStream, Object graph, Header[] headers, Boolean
f
Check)
at
System.Runtime.Remoting.Channels.CrossAppDomainSerializer.Seri
alizeMessageParts(ArrayList
argsToSerialize)
at
System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage..c
tor(IMethodCallMessage
mcm)
at
System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage.Sm
uggleIfPossible(IMessage
msg)
at
System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProces
sMessage(IMessage
reqMsg)
Exception rethrown at
[0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(
IMessage
reqMsg, IMessage
retMsg)
at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Messag
eData&
msgData, Int32
type)
at NAnt.DotNet.Tasks.LicenseGatherer.CreateLicenseFile(LicenseTas
k
licenseTask, String licenseFile) in c:\Documents and
Settings\Administrator\Lo
cal
Settings\Temp\tmp5AB.tmp\src\NAnt.DotNet\Tasks\LicenseTask.cs:line
213
at NAnt.DotNet.Tasks.LicenseTask.ExecuteTask() in c:\Documents an
d
Settings\Administrator\Loc al
Settings\Temp\tmp5AB.tmp\src\NAnt.DotNet\Tasks\Li
censeTask.cs:line
194
at NAnt.Core.Task.Execute() in c:\Documents and
Settings\Administ
rator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.Core\Task.cs:line
151
at NAnt.VSNet.Resource.CompileLicx() in c:\Documents and
Settings
\Administrator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.VSNet\Resource.cs:line
18
9
at NAnt.VSNet.Resource.Compile(ConfigurationSettings
configuratio
nSettings) in c:\Documents and Settings\Administrator\Local
Settings\Temp\tmp5AB
.tmp\src\NAnt.VSNet\Resource.cs:line
85
at NAnt.VSNet.Project.Build(ConfigurationBase configurationSettin
gs) i n
c:\Documents and Settings\Administrator\Local
Settings\Temp\tmp5AB.tmp\sr
c\NAnt.VSNet\Project.cs:line
338
at NAnt.VSNet.ProjectBase.Compile(String configuration) in c:\Doc
uments
and Settings\Administrator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.VSNet\
ProjectBase.cs:line
163
at NAnt.VSNet.Solution.Compile(String configuration) in c:\Docume
nts and
Settings\Administrator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.VSNet\Sol
ution.cs:line
294
at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask() in c:\Documents an
d
Settings\Administrator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.VSNet\Tasks\Sol
utionTask.cs:line
335
at NAnt.Core.Task.Execute() in c:\Documents and
Settings\Administ
rator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.Core\Task.cs:line
151
at NAnt.Core.TaskContainer.ExecuteChildTasks() in c:\Documents an
d
Settings\Administrator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.Core\TaskContai
ner.cs:line
103
at NAnt.Core.TaskContainer.ExecuteTask() in c:\Documents and
Sett
ings\Administrator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.Core\TaskContainer.cs
:line
73
at NAnt.Core.Tasks.IfTask.ExecuteTask() in c:\Documents and
Setti
ngs\Administrator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.Core\Tasks\IfTask.cs:l
ine
318
at NAnt.Co re.Task.Execute() in c:\Documents and
Settings\Administ
rator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.Core\Task.cs:line
151
at NAnt.Core.Target.Execute() in c:\Documents and
Settings\Admini
strator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.Core\Target.cs:line
217
at NAnt.Core.Project.Execute(String targetName, Boolean forceDepe
ndencies)
in c:\Documents and Settings\Administrator\Local
Settings\Temp\tmp5AB.
tmp\src\NAnt.Core\Project.cs:line
768
at NAnt.Core.Project.Execute() in c:\Documents and
Settings\Admin
istrator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.Core\Project.cs:line
730
at NAnt.Core.Project.Run() in c:\Do cuments and
Settings\Administr
ator\Local
Settings\Temp\tmp5AB.tmp\src\NAnt.Core\Project.cs:line 793
Total time: 12 seconds.
a couple notes:
1) I can build the project successfully within in Visual
Studio
2) my nant script will not build the project on a machine
where the dlls are registered in the GAC
3) I can build the project from nant on a machine which
does not have the libraries installed, As long as the .licx file is not
referenced as an embedded resource.
4) I cannot simply remove the reference to the dlls in the GAC,
because it disables their use by the gui form editor in Visual Studio
Any ideas?
thanks,
sb