Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8185677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:55:59+00:00 2026-06-07T01:55:59+00:00

I am using translation from resx files stored in App_GlobalResources folder with DataAnnotations in

  • 0

I am using translation from resx files stored in App_GlobalResources folder with DataAnnotations in a mvc3 model.

It works fine with a Required DataAnnotation, but it doesn’t work any more if i’m trying to use the Display DataAnnotation.

Here is my code:

[Required(ErrorMessageResourceType = typeof(Resources.Error), ErrorMessageResourceName = "RequiredClientName")]
[Display(Prompt = "ClientName", ResourceType = typeof(Resources.Front))]
public string Name { get; set; }

A System.InvalidOperationException is thrown only when I put the Display DataAnnotation

Here is the full exception(I am sorry, I didn’t find a way to translate it in english):

Impossible de récupérer la propriété ‘Prompt’ en raison de l’échec de
la localisation. Le type ‘Resources.Front’ n’est pas public ou ne
contient pas une propriété de chaîne statique publique avec le nom
‘FooterAbout’.

Description : Une exception non gérée s’est produite au moment de
l’exécution de la requête Web actuelle. Contrôlez la trace de la pile
pour plus d’informations sur l’erreur et son origine dans le code.

Détails de l’exception: System.InvalidOperationException: Impossible
de récupérer la propriété ‘Prompt’ en raison de l’échec de la
localisation. Le type ‘Resources.Front’ n’est pas public ou ne
contient pas une propriété de chaîne statique publique avec le nom
‘FooterAbout’.

The model I am using is stored in an Area.
Also, I can access values in my resx files from the _Layout, or in the Required DataAnnotation

Thank you for your help

Florent.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T01:56:01+00:00Added an answer on June 7, 2026 at 1:56 am

    The error message is pretty self explanatory (which I am translating for the non-French speaking audience of the site):

    Cannot retrieve property ‘Prompt’ because localization failed. Type
    ‘Resources.Front’ is not public or does not contain a public static
    string property with the name ‘ClientName’.

    You should make the resource file public by setting the Custom Tool to PublicResXFileCodeGenerator and the Build Action to Embedded Resource in the properties of your RESX file:

    enter image description here

    The reason for that is because by default the generated strongly typed class is internal and not accessible by Razor views which are compiled into a separate assembly at runtime.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Google Translation API to translate text from Chinese Simplified to English in
I'm using the LanguageService (translation service) from Bing. I generated the F# soap client
I am using the Microsoft Translation api (AJAX Version) from http://www.microsofttranslator.com/dev/ I am having
I am developing a simple translator from MathML to Latex, using Lex and Yacc.
I have a Canvas with a scale translation applied in XAML. Using DrawingContext I
In ASP.NET which is better performance wise; Localization using the file based resx /
Lately at work, I've been doing some translation from Makefiles to an alternative build
I have almost completed a translation from C# to VB.NET, however, I run into
I'm planning to create something that would do automated translation from Java to C#
We are currently building a mid-sized intranet application using MVC3. One requirement is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.