> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:nant- > [EMAIL PROTECTED] On Behalf Of Tony McCreath > Sent: donderdag 9 november 2006 0:42 > To: nant-developers@lists.sourceforge.net > Subject: [nant-dev] .Net 2.0 Task dlls > > I've just upgraded to .Net 2.0 and in the process converted my NAnt > tasks. > > However, NAnt (0.85) cannot read these tasks once compiled into .Net > 2.0! > > I am specifying -t:net-2.0 > > using something like: > <loadtasks assembly="Assemblies\Nexus.NAnt.Tasks.dll" /> > > I get: > > BUILD FAILED > C:\Documents and Settings\Tony McCreath\My Documents\Visual Studio > Projects\Nexus\Storm2_1\Nexus.Storm.Build\Release.WebSite.build(23,4): > Failure scanning \"C:\Documents and Settings\Tony McCreath\My > Documents\Visual Studio > Projects\Nexus\Storm2_1\Nexus.Storm.Build\Assemblies\Nexus.NAnt.Tasks.d > ll\" > for extensions. > The format of the file 'Nexus.NAnt.Tasks.dll' is invalid.
Changing the target framework (using -t or using the nant.settings.currentframework property) does not affect the CLR in which NAnt is running. The NAnt binaries that are shipped in the distribution packages are built targeting .NET 1.0, and would therefor prefer to run on the .NET Framework 1.0 (unless it's not installed). However, we ship NAnt with an application configuration file (NAnt.exe.config) in which we force NAnt to run on the latest available CLR (.NET 2.0 / Mono 2.0) if available. This is done using the <supportedruntime> elements in the <startup> node. Now, on to your issue: * have you manually modified NAnt.exe.config, and removed some elements from the <startup> node ? * do you have .NET 2.0 installed on the system on which you're trying to load the .NET 2.0-built task assembly ? * are you allowed to share the task assembly in question ? Gert ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers