开发者

Can I use a .rc resource file on a C# project?

开发者 https://www.devze.com 2023-01-29 18:44 出处:网络
I have a solution in C# and i need to update the version in the resource files (.resx files are xml files), i alre开发者_如何学JAVAady did it in C++ resource files (not xml files) and I want to know i

I have a solution in C# and i need to update the version in the resource files (.resx files are xml files), i alre开发者_如何学JAVAady 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.


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.


No you can't, but there are some ways to convert, see this link: Building Managed Resources from Win32 Resources

0

精彩评论

暂无评论...
验证码 换一张
取 消