I have one application which generate xml file, I have to embedded that xml file to another Application (demo.exe) through C# program dynamically. This demo.exe application reads that xml file.
Asked
Active
Viewed 162 times
0
-
Is this `demo.exe` a project you've built? Or just some application you've got as an `exe` file? – Matt Hogan-Jones Jun 01 '17 at 08:42
-
i build that demo.exe application. – Joby James Jun 01 '17 at 08:44
-
Then why can't you add the text file as an item to the project, and then set its Build Action to `embedded resource`? – Matt Hogan-Jones Jun 01 '17 at 08:45
-
Just to be sure: you want to add an Embedded Resource to an application, but the application you want to embed it in first has to generate the file you would like to embed? I would say: 1. build & run the application 2. generate the file 3. add the file as an embedded resource 4. rebuild the application including the embedded resource – rickvdbosch Jun 01 '17 at 08:45
-
1You need to put more detail in your question - I have no idea what you're trying to do. – Matt Hogan-Jones Jun 01 '17 at 08:48
-
How to embed exe file with xml file through C# program – Joby James Jun 01 '17 at 09:09
-
Why do you have to embed it? Why not just load it from disk? Programatically embedding resources is complex and can be problematic. – Matt Hogan-Jones Jun 01 '17 at 09:12
-
If you want to do it like that then this is a duplicate of https://stackoverflow.com/questions/1107912/programmically-embed-resources-in-a-net-assembly – Matt Hogan-Jones Jun 01 '17 at 09:13