简体   繁体   English

asp.net Web应用程序,发布后找不到嵌入式资源

[英]asp.net web app, embedded resource not found after publishing

As explained in title, this sounds very simple, though, I have not been able to make it work or to understand why by my researches. 正如标题中所述,这听起来很简单,但是根据我的研究,我无法使其工作或理解其原因。

Simple scenario : I create a web app in ASP.NET. 简单方案:我在ASP.NET中创建一个Web应用程序。 I create my App_GlobalResources foledr, with some Resource.resx, set with a Build 'Embedded' When I publish and try the web app : [Parser Error] The resource object with key 'Msg1' was not found. 在发布并尝试使用Web应用程序时,我创建了带有一些Resource.resx并设置为“嵌入”的App_GlobalResources foledr:[解析器错误]找不到键为“ Msg1”的资源对象。

thanks for your help! 谢谢你的帮助!

since you didn't get any responses and I was facing the same trouble, I feel like I should answer you. 由于您没有得到任何答复,而我也面临着同样的麻烦,所以我觉得我应该回答您。 The solution is very simple, after you did the Publish Web Application, you only need to right click the "App_GlobalResources"(in my case) and select "Publish App_GlobalResources", that will copy the .resx files into the root and it should work! 解决方案非常简单,在完成发布Web应用程序后,只需右键单击“ App_GlobalResources”(在我的情况下),然后选择“发布App_GlobalResources”,它将.resx文件复制到根目录中并且应该可以正常工作!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM