1
I have been working on an ASP.NET MVC project for months. It is a system available in English and Portuguese, English being the default language. I do this through the use of Resources, and it was working smoothly, see image below.
However, now when trying to add a new String in Translation.resx, when compiling gives class ambiguity errors.
The namespace 'Volunteergames.Web.Translations' already contains a Definition for 'Translation'
and
Ambiguity between 'Volunteergames.Web.Translations.Translation.Resourcemanager' and 'Volunteergames.Web.Translations.Translation.Resourcemanager'
I noticed that after inserting this new string, the visual studio created another file called Translation1.Designer.Cs. This file also has a class called Translation.
So if I delete this new created file, I can compile, but the new Resource string I created is not found when I try to use in the controller.
Any idea what may have occurred or is occurring that keeps creating this file Translation1.Designer.Cs giving ambiguity?
This answer is very similar to what happened to you. https://social.msdn.microsoft.com/Forums/en-US/fe66fbe7-50ef-4250-bbde-6ffc545bc929/ambiguity-between-projectpropertiesresourcesgradient-and?forum=Vsexpressvcs. If you have difficulty in English, translate into Rome itself, you can understand.
– Marconi
How you created this new file?
– Randrade
I didn’t create it. It was created automatically when I added a new string in resx.
– user26552