在 Visual Studio 2013 中找不到这些选项 [英] Can't find these options in Visual Studio 2013

本文介绍了在 Visual Studio 2013 中找不到这些选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的 Visual Studio 版本:

我的项目是一个 C++ CLR/CLI Winforms.我不得不更改我的项目的命名空间,然后我遇到了资源 .resx 文件的问题.根据其他答案,我必须将资源 .resx 属性中的 Custom Tool Namespace 更改为我的自定义命名空间,但我找不到这样的选项:

没有构建操作也没有自定义工具命名空间,这是我得到的:

似乎较旧和较新版本的 Visual Studio 都有,但我的版本没有,有些人告诉要更改 .cs、.csproj 或 .vbproj 文件中的特定值,但我的项目根本没有.

我将我的项目迁移到 Visual Studio 2019 社区,我的项目已转换为 2019,但它没有帮助,仍然是相同的资源 resx 属性,因此我无法更改链接到我的资源 resx 文件的命名空间.我已经搜索了几个小时,但没有看到与此问题相关的任何答案,如果有人能解决这个问题,我将不胜感激.

解决方案

我想通了,正如您在我的图片示例中看到的那样,有 Resource Logical Name,将其设置为您的自定义命名空间,例如:MyNameSpace.MyResourceFileName.resources

记住它必须以 .resources 结尾,就像示例中一样.

注意:不要将ResourceFileName和ClassName混淆,为本地化的资源文件设置Resource Logical Name时可能会出错.

This is my version of Visual Studio:

My project is a C++ CLR/CLI Winforms. I had to change the namespace of my project then I'm having issues with the resource .resx file. According to other answers out there I have to change the Custom Tool Namespace in the resource .resx property to my custom namespace but I can't find such an option like this:

No Build Action nor Custom Tool Namespace, this is what I get instead:

It seems older and newer versions of Visual Studio have it but not my version, some people tell to change specific values in .cs, .csproj or .vbproj files, but my project doesn't have it at all.

EDIT: I migrated my project to Visual Studio 2019 Community, my project got converted to 2019 but it didn't help, still same resource resx property so I'm not able to change the namespace linked to my resource resx file. I've been searching for hours I don't see any answer related to this issue though, I'd appreciate if anyone could solve this.

解决方案

I figured it out, as you can see in my picture example, there's Resource Logical Name, set that to your custom namespace, for example: MyNameSpace.MyResourceFileName.resources

Remember it has to end with .resources like in the example.

Attention: Do not confuse ResourceFileName with ClassName, you might get it wrong when setting Resource Logical Name for localized resource files.

这篇关于在 Visual Studio 2013 中找不到这些选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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