Click here to Skip to main content
15,921,577 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello

I used this code for write to Resx embedded file.
C#
Assembly assembly = Assembly.LoadFrom(@"ClassLibrary2.dll");
Stream stream = assembly.GetManifestResourceStream(@"ClassLibrary2.defualt.resources");

ResourceWriter rw = new ResourceWriter(stream);
rw.AddResource("welcomeString", "www.navioo.com");
rw.Generate();
rw.Close();

but when I run it I watch an error . this error is :
HTML
Stream was not writable.

pleas help me.
Posted
Updated 2-Sep-12 18:10pm
v2
Comments
AmitGajjar 3-Sep-12 1:24am    
check if your class library is not readonly.

Manifest resource streams are readonly and cannot be written to this way.

See the following : http://www.c-sharpcorner.com/uploadfile/yougerthen/handle-resource-files-read-and-write-into-a-resource-file-programmatically-part-iv/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900