我可以用一个.RC资源文件在C#项目? [英] Can I use a .rc resource file on a C# project?

查看:108
本文介绍了我可以用一个.RC资源文件在C#项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#中的解决方案,我需要更新的资源文件的版本(.resx文件是XML文件),我已经做到了在C ++中的资源文件(不是XML文件),我想知道如果我能使用类似的东西在我的C#项目。

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.

推荐答案

您不能直接从Visual Studio做到这一点。

You can't do it directly from Visual Studio.

如果您直接调用 CSC 编译器,可以使用 / win32res嵌入res文件,在命令行标志。 (使用 RC 工具来生成从.RC一个.RES。)

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.)

另外,你可以建立自己的EXE通过Visual Studio为正常,然后添加一个后生成步骤调用反汇编然后按 ILASM ILASM 支持 /资源= 命令行标志。

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.

这篇关于我可以用一个.RC资源文件在C#项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆