" not found. Automatic Deployment of an ASP.NET MVC3 Application I have an ASP.NET MVC 3 application that I have loc...">

Resource object with key "<key>" not found. Automatic Deployment of an ASP.NET MVC3 Application

I have an ASP.NET MVC 3 application that I have localized using LocalResources. Everything (as always) works on my machine, but when the application is deployed (by automatically deploying tfs) to my test environment, I get the following error:

Resource object with key not found

My resource files (in the App_LocalResources folders) are marked as EmbeddedResources, they have a custom tool associated with them, and their availability is set to Public.

When I look at what is being deployed in testing, the only hint of resources that I see are some culture-specific clouds in / bin (i.e. / bin / en containing one .dll).

My gut tells me that I somehow lack the default resources.

What am I missing?

+2
source share
2 answers

In contrast, every tutorial on the Internet tells you that it is not necessary to install Build Action for EmbeddedResource. In my case, I got my code to work by setting it to Content. Thus, resource files are deployed along with your code.

+4
source

I usually use App_GlobalResources for multilingual files. You can also right-click on the resx properties and change the Build Action to Embedded Resource, which I hope should include it in the output as expected.

0
source

Source: https://habr.com/ru/post/910034/


All Articles