我在 VS2005 中有一个 PPC2003 项目。我在项目中添加了一个资源文件 (SomeResources.resx)。My.Resources.SomeResources.MyTestString
我可以使用(我正在使用VS 提供的默认自定义工具名称)访问我在文件中的测试字符串。
当 的Build Action属性设置为Embedded Resource
时,应用程序引用MyTestString
成功。
但我不想嵌入文件,以便在部署/安装后可以修改它的字符串值。
因此,我将Build Action更改为Content
,以便将文件复制到设备上,以便将来进行操作。当我打电话时,MyTestString
我收到以下错误:
MissingManifestResourceException 堆栈跟踪:在 System.Resources.ResourceManager.InternalGetResourceSet() 在 System.Resources.ResourceManager.InternalGetResourceSet() 在 System.Resources.ResourceManager.InternalGetResourceSet() 在 System.Resources.ResourceManager.GetString() 在 MyApp.My.Resources .SomeResources.get_MyTestString() 在 MyApp.fMain.fMain_Load() 在 System.Windows.Forms.Form.OnLoad() 在 System.Windows.Forms.Form._SetVisibleNotify() 在 System.Windows.Forms.Control.set_Visible()在 System.Windows.Forms.Application.Run() 在 MyApp.fMain.Main()
由于文件没有嵌入,我可能需要先手动加载它吗?如果是这样,怎么做?还有其他想法吗?在实现之后就不可能做我想做的事情,我应该只创建自己的 XML 文件/阅读器吗?