-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: SijuInfinite
Message 1 in Discussion




Hello All,
I am creating Resource File,Then creating resx file and then finally embed 
it to a dll
 
>From That dll I am trying to read the key in the resource file.But it is 
throwing the error.
 
Upto creating dll it is working fine.Finally when  I tried to read the 
key from Resource file it is throwing the error.
 
Code is pasted below

IResourceWriter writer = new 
ResourceWriter("myResources.resources");

writer.AddResource("String 1", "First 
String");

writer.AddResource("String 2", "Second 
String");

writer.AddResource("String 3", "Third 
String");

writer.Close();

MessageBox.Show("Writting to Resource 
File....");



System.Diagnostics.Process prc1=new 
System.Diagnostics.Process();

prc1.StartInfo.FileName="C:/Program Files/Microsoft 
Visual Studio .NET/FrameworkSDK/Bin/ResGen.exe";

prc1.StartInfo.Arguments="E:/Siju/WApplication/WindowsApplication3/bin/Debug/myResources.resources
 
E:/Siju/WApplication/WindowsApplication3/bin/Debug/myResources.resx"; 


prc1.Start();

MessageBox.Show("Creating resx file....");

System.Diagnostics.Process prc2=new 
System.Diagnostics.Process();

prc2.StartInfo.FileName="C:/WINNT/Microsoft.NET/Framework/v1.0.3705/al.exe";

//"/t:lib 
/embed:E:/Siju/WApplication/WindowsApplication3/bin/Debug/myResources.resx 
/out:E:/Siju/WApplication/WindowsApplication3/bin/Debug/myResources.dll"

prc2.StartInfo.Arguments="/t:lib 
/embed:E:/Siju/WApplication/WindowsApplication3/bin/Debug/myResources.resx 
/out:E:/Siju/WApplication/WindowsApplication3/bin/Debug/myResources.dll"; 


prc2.Start();

MessageBox.Show("Embedding it to dll");

Assembly asm = 
Assembly.LoadFrom("E:/Siju/WApplication/WindowsApplication3/bin/Debug/myResources.dll");

ResourceManager rm = new 
ResourceManager("WindowsApplication3.myResources",asm);

label1.Text = rm.GetString("String 
1");




Siju 
C 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to