发布/部署Web应用程序不包括资源文件 [英] Publish/Deploy web application does not include resource files
本文介绍了发布/部署Web应用程序不包括资源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的asp.net MVC2 Web应用程序中,我在 App_GlobalResources文件夹下有 global.resx 文件.为资源文件设置了以下属性.
In my asp.net MVC2 web application, I have global.resx file under App_GlobalResources folder. Following properties are set for the resource file.
Build Action: Embedded Resources
Copy to output Directory: Do not copy
Custom Tool: PublicResXFileCodeGenerator
我在aspx和class文件中都使用了此文件.而且效果很好.
但是,当我发布应用程序时,由于aspx&类文件找不到该文件的引用.
I am using this file in both aspx and class files. And it works fine.
But when I publish my application, the global.resx file does not get copied into the deployed directory due to which aspx & class files fails to find the reference of the file.
How can I make sure this file gets copied when I deploy the project?
推荐答案
尝试将复制到输出目录"属性更改为始终".
try changing the Copy to output directory property to "always".
这篇关于发布/部署Web应用程序不包括资源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文