Hi -
Assistance required for a NAnt newbie struggling to resolve the dreaded message:
'Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "FileTranslator.Properties.Resources.resources" was correctly embedded or linked into assembly ...' 8)
VS2010, C#, Net 4.0, NAnt 0.91 alpha 1 (unmodified).
- The solution consists of a console application with several associated DLLs.
- A number of the projects include embedded resource strings input via the project Properties / Resources.
- The resultant Resources.resx file is flagged as an 'Embedded Resource' along with [currently] 'Do not copy' though I have tried all settings i.e. Copy always, copy if newer etc.
I have tried both:
- return Properties.Resources.DEFAULT_RECIPIENT; and
- return rm.GetString("DEFAULT_RECIPIENT"); where rm = ResourceManager.
My results thus far:
- The IDE solution build works fine.
- The NAnt build using the 'exec' command to execute MSBuild works fine.
The following NAnt build using the 'csc' command fails with the dreaded message.
<!-- compile the application --> <target name="compile" depends="compile_ClassFactory" description="compiles the FileTranslator .exe"> <property name="curr.dll" value="FileTranslatorConsole" /> <resgen todir="src\${curr.dll}"> <resources> <include name="src\${curr.dll}\**\*.resx" /> </resources> </resgen> <csc target="exe" output="${target.dir}\${projname}.exe" keyfile="src\\${curr.dll}`\\${curr.dll}SNK.snk" debug="${debug}" verbose="true"> <sources basedir="src\${curr.dll}">' <include name="**\*.cs" /> <include name="${build.dir}\AssemblyInfo.cs" /> <exclude name="**\AssemblyInfo.cs" /> </sources> <resources> <include name="src\FileTranslatorConsole\Resources.resources" /> <include name="src\FileTranslatorConsole\app.config" /> </resources> <references> <include name="${target.dir}\*.dll" /> </references> </csc> </target>
Any suggestions would be gratefully accepted