resx 文件是否必要?

发布于 2024-08-04 18:28:12 字数 279 浏览 9 评论 0原文

目前有一个在 VS2003 中创建的解决方案已转到 VS2005,现在在 VS2008 中。 从一开始,每个 aspx 和 ascx 都有一个关联的 .resx 文件。尽管不需要本地化,但 resx 文件是自动创建的。可以删除这些 resx 文件吗?由于他们不存在,他们会提高性能吗?

有趣的是,最初,resx 文件是在与 aspx/ascx 文件相同的目录中创建的。现在,在 VS2008 中,如果我创建一个 resx 文件,它会创建一个 App_LocalResources 目录并将所有 resx 文件放在那里......

Currently have a solution that was created in VS2003 went to VS2005 and now is in VS2008.
Since the start, each aspx and ascx had an associated .resx file. The resx files were autocreated, even though localization is not needed. Is it okay to get rid of these resx files? Will they improve performance at all since they are not there?

Interesting note, initially, the resx files were created in the same directory as aspx/ascx files. Now, with VS2008, if I create a resx file, it creates an App_LocalResources directory and puts all resx files there...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

○闲身 2024-08-11 18:28:12

是的,您可以删除 .resx 文件,请确保您的页面已设置为无需 .resx 文件即可工作。我的意思是您的标签有一个文本值,并且不需要 .resx 文件来提供它。

此外,如果文件已经存在,它们不会引起那么多问题,我会保留它们。

Yes, you can delete the .resx files, BUT make sure that your pages are already setup to work without the .resx files. By this I mean that your labels have a text value and it does not require the .resx file to supply it.

Furthermore, if the files are already there, they don't cause all that many problems, I'd leave them.

ヤ经典坏疍 2024-08-11 18:28:12

老实说,如果您可以肯定地说您永远不会支持本地化,那么 resx 文件并不是真正必要的。您可以直接在 aspx 和 ascx 文件中设置服务器控件的属性。
但是将它们分开仍然可以让您选择让一些非程序员修改您网站上的文本。您可以使用免费的 resx 编辑器。

关于 App_LocalResources 目录,只要我使用过 resx 文件(自 VS 2005 起),它们就会被放置在 App_LocalResources 中,所以对我来说,更奇怪的是它们以前没有放置过。

但是,当您说这些文件是自动创建的时,我认为您必须在某些项目设置中为您的项目启用本地化,因为我从未自动收到它们,我总是手动创建它们。

Honestly, if you can say for sure that you are NEVER going to support localization, then the resx files are not really necessary. You can just set the properties on the server controls directly in the aspx and ascx files.
But having them separated still gives you the option of letting some non-programmers modify the texts on your site. There are free resx editors that you can use.

Regarding the App_LocalResources directory, as long as I have worked with resx files (since VS 2005) they have been placed in App_LocalResources, so for me it's more odd that they weren't previously.

But when you say that the files are autocreated, I think that you must have enabled localization for your project in some project setting, because I have never received them automatically, I have always created them manually.

南烟 2024-08-11 18:28:12

你可以删除它,但这个文件帮助我们以一种简单的方式维护我们的资源,并以更方便的方式使用它们,并且图片等资源......以智能感知的形式出现......

you can delete it but this file helps us to maintain our resouces in an easy way and use them in a more convinient way and the resouces such as pics etc.. come up as intellisense...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文