Visual Studio Development Bookmark and Share   
 index > Developer Documentation and Help System > how to add files to the project namespace in visual studio?
 

how to add files to the project namespace in visual studio?

hi all,

i am having a problem in adding the image files to project namespace. I m trying to do this like........

Step 1:Going to add exsisting item menu.

Step 2:Then browsing to the file that i want to add and simply adding it.

But when i m trying to read this file by this method-------


Assembly myAssembly = Assembly.GetExecutingAssembly();
                                    Stream myStream = myAssembly.GetManifestResourceStream("namespace.filename.fileExtension");
                                    img = new Bitmap(myStream);

i get null in myStream. i think there is some other way to add files to the namespace of the project because previously i have added some files and the same method is working for those files.

Anybody knowing the answer please help.

regards,
Madhup
Madhup Singh Yadav  Friday, October 09, 2009 4:41 AM
ooops!!!!!


i was doing a silly mistake.

sorry all i found out that i was not setting the property of resource as embedded resource.

now its working fine again.

regards,
Madhup
Madhup Singh Yadav  Friday, October 09, 2009 5:11 AM

You can use google to search for other answers

Custom Search

More Threads

• CHM 'What's this?' style context sensitive help
• Help Update In Progress
• Spellchecker for XML documentation comments?
• MRefBuilder not seeing public members of class
• DataGridView Auto Generated Add Edit Delete How to implement.??
• ?? Cannot Get Local Help Search to Work ??
• Help crashes Visual Studio 2003
• Special characters in XML comments?
• Sandcastle license?
• Adding the user defined Tags in CHM using the Sandcastle