问题
I have a solution in C# and i need to update the version in the resource files (.resx files are xml files), i already did it in C++ resource files (not xml files) and I want to know if I can use something like that in my C# project.
回答1:
You can't do it directly from Visual Studio.
If you invoke the csc
compiler directly, you can embed a .res file using the /win32res:
flag on the command line. (Use the rc
tool to generate a .res from a .rc.)
Alternatively, you could build your EXE through Visual Studio as normal, then add a post build step that invokes ildasm
followed by ilasm
. ilasm
supports the /resource=
command line flag.
回答2:
No you can't, but there are some ways to convert, see this link: Building Managed Resources from Win32 Resources
来源:https://stackoverflow.com/questions/4390463/can-i-use-a-rc-resource-file-on-a-c-sharp-project