c++ - 将 C++ .net 代码从 MSVS2005 移植到 MSVS2010 时找不到资源(?)

标签 c++ .net windows resources

其实我不知道这个问题是否已经有人回答了,因为我不知道“真正”的问题在哪里。上下文如下:我有 C++ .NET 代码,我正尝试将其从 MSVS2005 移植到 MSVS2010,即从 .NET 2.0 移植到 .NET 4.0。当为启动时创建的其中一个表单输入方法 InitializeComponent() 时,我得到一个第一次机会异常 System.Resources.MissingManifestResourceException' occurred in mscorlib.dll 当调用 resources->ApplyResources( this->MyControl, L"MyControl")

附加信息是:

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "MyForm.resources" was correctly embedded or linked into assembly "MyAssembly" at compile time, or that all the satellite assemblies required are loadable and fully signed.

  1. 它在使用 MSVS2005 编译时完美运行。
  2. MSVS201 0 auto 无问题地转换了所有的解决方案。
  3. .resx 文件在那里。

因为我不知道问题的根源,所以我不能多说。如果您尝试帮助我,我将非常乐意为您提供更多信息。

预先感谢您的帮助。

多米尼克

最佳答案

确保您的 resx 文件和组件的命名空间相同。

我之前看过它,其中 resx 被编译为 SomeFoo.MyForm.resources,其中表单位于 SomeFoo.Forms.MyForm

关于c++ - 将 C++ .net 代码从 MSVS2005 移植到 MSVS2010 时找不到资源(?),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11883791/

相关文章:

C++ istream operator >>

c++ - 如何调用移动构造函数?

c# - 从 ToolStripMenuItem 打开 ContextMenu

Windows 服务设置用户帐户

windows - git-svn 在 Windows 上忽略 subversion 配置文件 (auto-props)

c++ - 无法使用 boost 在 eclipse 中找到 libboost_system.so.1.43.0

c++ - 使用 SDL 逐像素绘图会导致性能不佳?

.net - Excel xml 电子表格 - 是否可以嵌入图像?

c# - 捕获由外部程序集处理的异常

c++ - 目录相对 ZwCreateFile