I have a project where I need to compile and link some resources. This works great when the resources are compiled with al.exe, but it does not work when I compile it myself using a CSharpCodeProvider. The resources are written to a resource file using a ResourceWriter just prior to compilation of the .dll.
The resources manager wont read the generated .dll although when you compare the two files(the one complied with al.exe and the other) there aren't any differences.
Any suggestions? Thanks for your help
Code follows:
public static void MakeResourceDll(DataTable MDT)
{
string language = lang();
ResourceWriter rw = new ResourceWriter("SoftwareLanguage."+language + ".resources");
for (int i = 0; i < MDT.Rows.Count; i++)
string keys = MDT.Rows["Keys"].ToString();
string Values = MDT.Rows["Translations"].ToString();
rw.AddResource(keys, Values);
}
rw.Generate();
rw.Close();
//------------------------------------------------------------------------------------------
ccu.ReferencedAssemblies.Clear();
att.Arguments.Add(
ccu.AssemblyCustomAttributes.Add(att);
att =
cp.GenerateExecutable =
cp.CompilerOptions =
cp.OutputAssembly =
cp.GenerateInMemory =
err+=