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'
Flexo
  • 87,323
  • 22
  • 191
  • 272
yonexbat
  • 2,902
  • 2
  • 32
  • 43

1 Answers1

0

Ok, I will answer my question, maybe there is a better solution:

I did not find a nant task to create satellite assemblies. However, you can create one with al task.

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

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

</al>   

Since I did not find out how to set the namespace for the resourcefile, I just renamed it:

<move file="${build}/ResourceManagement.de.resources"
               tofile="${build}/YourNamespace.ResourceManagement.de.resources"
               overwrite="true"/>
yonexbat
  • 2,902
  • 2
  • 32
  • 43