Greco Giuseppe wrote:

<csc ...>
...
<resources> <include name="*.resx"/>
</resources>
</csc>


will work just fine.




Just a question: does the <resource> element automatically embed the defalut resources into the assembly, or is the <arg> element still necessary?



If the name of the .resx file contains a culture part it will package it up with any other resources for that culture in a satellite assembly in the appropriate child directory. If not it will embed the resource in the main assembly. - so the are element is not necessary.

For example - this build fragment :

<csc target="exe" output="ListCultures.exe" debug="true">
<sources>
<include name="ListCultures.cs"/>
<include name="RM.cs"/>
</sources>
<resources>
<include name="*.resx"/>
</resources>
</csc>


produces this log output :

[csc] Compiling 2 files to 'C:\ianm\dev\test\csharp\Globalization\ListCultures.exe'.
[resgen] Output file 'C:\ianm\dev\test\csharp\Globalization\ListCultures.ja-JP.resources' does not exist, recompiling.
[resgen] Starting 'C:\Program Files\Microsoft.NET\SDK\v2.0\bin\resgen.exe (/usesourcepath "C:\ianm\dev\test\csharp\Globalization\ListCultures.ja-JP.resx" "C:\ianm\dev\test\csharp\Globalization\ListCultures.ja-JP.resources")' in 'C:\ianm\dev\test\csharp\Globalization'
[resgen] Read in 2 resources from "C:\ianm\dev\test\csharp\Globalization\ListCultures.ja-JP.resx"
[resgen] Writing resource file... Done.
[resgen] Output file 'C:\ianm\dev\test\csharp\Globalization\ListCultures.resources' does not exist, recompiling.
[resgen] Starting 'C:\Program Files\Microsoft.NET\SDK\v2.0\bin\resgen.exe (/usesourcepath "C:\ianm\dev\test\csharp\Globalization\ListCultures.resx" "C:\ianm\dev\test\csharp\Globalization\ListCultures.resources")' in 'C:\ianm\dev\test\csharp\Globalization'
[resgen] Read in 3 resources from "C:\ianm\dev\test\csharp\Globalization\ListCultures.resx"
[resgen] Writing resource file... Done.
[csc] Contents of C:\Documents and Settings\ianm\Local Settings\Temp\tmp39C.tmp.
[csc] /fullpaths
[csc] /debug
[csc] "/define:DEBUG"
[csc] "/define:TRACE"
[csc] /nologo
[csc] "/target:exe"
[csc] "/out:C:\ianm\dev\test\csharp\Globalization\ListCultures.exe"
[csc] "/resource:C:\ianm\dev\test\csharp\Globalization\ListCultures.resources,ListCultures.resources"
[csc] "C:\ianm\dev\test\csharp\Globalization\ListCultures.cs"
[csc] "C:\ianm\dev\test\csharp\Globalization\RM.cs"
[csc]
[csc] Starting 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\csc.exe (@"C:\Documents and Settings\ianm\Local Settings\Temp\tmp39C.tmp")' in 'C:\ianm\dev\test\csharp\Globalization'
[al] 'C:\ianm\dev\test\csharp\Globalization\ListCultures.exe' has been updated, recompiling.
[al] Compiling 0 files to 'C:\ianm\dev\test\csharp\Globalization\ja-JP\ListCultures.resources.dll'.
[al] Contents of C:\Documents and Settings\ianm\Local Settings\Temp\tmp39F.tmp.
[al] /target:"lib"
[al] /out:"C:\ianm\dev\test\csharp\Globalization\ja-JP\ListCultures.resources.dll"
[al] /culture:"ja-JP"
[al] /template:"C:\ianm\dev\test\csharp\Globalization\ListCultures.exe"
[al] /nologo
[al]
[al] Starting 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\al.exe (@"C:\Documents and Settings\ianm\Local Settings\Temp\tmp39F.tmp" /embed:"C:\ianm\dev\test\csharp\Globalization\ListCultures.ja-JP.resources",ListCultures.ja-JP.resources)' in 'C:\ianm\dev\test\csharp\Globalization'



------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to