Is there a way to have the Visual Studio .NET IDE automatically compile a text file into a resource file (.resource) and then have it embedded in a project's output assembly? I know the IDE has support for ResX files, but I'd like to use plain text files instead.
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
As it stands right now, I just create reference to a .resource file and, when I need to update that file, drop to the command-line and run resgen on the source text-file. I just wish there was an easier way.
Would this require the creation of a VS.NET add-in?
Actually, it's quite easy to do what you want. After you add the text file to the project, do the following in the properties for that project.
- Set the Build Action to Embedded Resource.
- In the Custom Tool field, type in RESGEN.
Dig Deeper on Win Development Resources
Related Q&A from John Robbins
What is a JAD session? This term is referred to often in job postings and seems like some kind of brainstorm you carry out with a client to define IT...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.