Kevin, If you want NAnt to generate manifest resource names that match those of VS.NET, you should configure the <resources> element like this :
<resources dynamixprefix="true" prefix="<default namespace as set in VS.NET>"> <include name="*.resx" /> </resources> eg. <resources dynamixprefix="true" prefix="ErrorLog"> <include name="*.resx" /> </resources> Hope this helps, Gert ----- Original Message ----- From: "Burton, Kevin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 29, 2004 4:39 PM Subject: [Nant-users] .NET resources. I seem to have a problem with embedding resources in a DLL. Here is my build task: <csc target="library" output="${build.dir}/ErrorLog.dll"> <arg value="/define:USEKEYCONTAINER" /> <arg value="/define:DEBUG" /> <arg value="/define:TRACE" /> <sources> <include name="*.cs"/> </sources> <resources> <include name="*.resx" /> </resources> <references basedir="${build.dir}"> </references> </csc> The output looks like: [echo] Building ErrorLog... [csc] Compiling 5 files to 'D:\Projects\Visa\MR0804\Application Server Code\build\debug-2.1.18\ErrorLog.dll'. [resgen] Read in 522 resources from 'D:\Projects\Visa\MR0804\Application Server Code\ErrorLog\ErrorResources.resx' [resgen] Writing resource file... Done. [resgen] Read in 5 resources from 'D:\Projects\Visa\MR0804\Application Server Code\ErrorLog\WebMessages.resx' [resgen] Writing resource file... Done. Build succeeded But I am getting the following exception when I try to access the resource (in this case a string): Info: Thursday, July 29, 2004 3:41:50 AM: RESERR: The resource manager is throwing an exception(System.Resources.MissingManifestResourceException). Resource DATA0119I not found. Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "ErrorLog.ErrorResources.resources" was correctly embedded or linked into assembly "ErrorLog". This does not happen with builds using the IDE. What am I doing wrong? Thank you. Kevin Burton [EMAIL PROTECTED] ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idG21&alloc_id040&op=ick _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idG21&alloc_id040&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users