title: How to reference resources file from webapplication in dll's
body: <p>We are using mvc 5 and we want to use resource files for our localization. We have a dll used by many customer applications in which we would like to place some defaut view models:
  <a href="https://i.stack.imgur.com/qrSgP.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qrSgP.jpg" alt="application structure"></a></p>
  
  <p>The ViewModel now looks something like this:</p>
  
  <pre><code>public class Person
  {
      //...
      [Display(ResourceType = typeof(Resources), Name = "NameKey")] //type or namespace Resources could not be found
      public string FirstName { get; set; }
      //...
  }
  </code></pre>
  
  <p>This view model works fine when placed in either CustomerX or CustomerY project, but breaks when moved to the referenced BaseWebApp as Resources is not a known type there.
  At rendering time resource file is available, the only thing that throws a monkey wrench in the scheme is the resource's Type as the location specifier. 
  Is there an other way to specify the resource file as source of localization strings? </p>