2012-12-09 75 views
0

我正在尋找一個帶衛星組件的南特樣本。 我現在搜索了幾個小時沒有成功。Nant和衛星組件

我能走到今天:

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

和CSC子元素:

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

但是我怎麼也創建附屬程序集?當我嘗試包括非中性的資源我得到一個奇怪的錯誤(例如ResourceManagement.de.resources:

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

回答

0

好吧,我會回答我的問題,也許有更好的解決方案:

我做找不到一個惡性任務來創建附屬程序集。然而,您可以創建一個與任務

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

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

</al> 

因爲我沒有找到如何來設置的resourcefile的命名空間,我只是改名爲:。

<move file="${build}/ResourceManagement.de.resources" 
       tofile="${build}/YourNamespace.ResourceManagement.de.resources" 
       overwrite="true"/>