0

Am looking for a Nant sample with satellite assemblies. I googled now for hours without success.

I got this far:

<resgen todir="${build}">
  <resources>
     <include name="${src}/Resources/*.resx" />
  </resources>
</resgen>

and the csc subelement:

<resources prefix="Resources">
  <include name="${build}/ResourceManagement.resources" />            
</resources>   

But how do I do create the satellite assemblies? When I try to include non neutral resources I get a strange error (for example ResourceManagement.de.resources:

System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.RuntimeCompatibilityAttribute' from assembly 'myassembly'
4

1 回答 1

0

好的,我会回答我的问题,也许有更好的解决方案:

我没有找到创建附属程序集的任务。但是,您可以使用al任务创建一个。

<al output="${build}/de/myassembly.resources.dll" 
          target="lib"
          culture="de-CH">

         <sources>
            <include name="${build}/Resources.ResourceManagement.de.resources" />            
         </sources>        

</al>   

由于我没有找到如何为资源文件设置命名空间,我只是将其重命名:

<move file="${build}/ResourceManagement.de.resources"
               tofile="${build}/YourNamespace.ResourceManagement.de.resources"
               overwrite="true"/>
于 2012-12-09T14:57:42.507 回答