I need to embed a file/text to c# project dll at build time.
I have tried following ways to do it:
Consider I am having a c# project MyProject,
1. I have created a Support.exe which actually creates a Resource.resx file and embeds the file to by updating MyProject.csproj. I called this support.exe in pre-build event of Myproject. But it did not embed the file to MyProject.dll. If I do a rebuild, the files were embeded.
2. Another way, I have used Assembly Linker to embed a file to the dll. I called the command al /out:MyProject.dll /embed:filename in post-build event of MyProject. But the assembly linker creates a new dll and it does not included the MyProject.cs file.
Is there any other ways to embed a file to c# project dll at buildtime ?
Thanks in advance !