Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

Unable to generate public class and properties of .Designer.cs of ResX #270

Closed
joplaal opened this issue Nov 7, 2015 · 5 comments
Closed

Comments

@joplaal
Copy link

joplaal commented Nov 7, 2015

When using previous versions of the framework, one could customize the behavior of the designer generated classes by choosing ResXFileCodeGenerator or PublicResXFileCodeGenerator as the Custom Tool in order to get the classes and properties internal or public.

Now, it seems that there is no way to choose, and the generated classes and properties are internal.

There are many side-effects if the default internal behavior can not be changed:

DisplayAttribute does not work: aspnet/Localization#134

It does not only apply to MVC Models. It also prevents using DataAnnotations for other validation frameworks, such the one used at EntityFramework or FluentValidation.

It also makes not possible to have a shared resources file with solution wide translations used in several projects.

If it's difficult to change the project.json or .xproj syntax to allow the behavior selection, IMO the default behavior of the generator should be public, since it allows all the scenarios.

@sayedihashimi
Copy link
Contributor

TFS: 162671
I've added this to our internal TFS, we will reply back here soon.

@oliverw
Copy link

oliverw commented Dec 1, 2015

👍

@joplaal
Copy link
Author

joplaal commented Dec 1, 2015

At rc1, localization is frustrating, important issues like this one are no solved, as many other ones as stated in dotnet/aspnetcore#1142

@sayedihashimi
Copy link
Contributor

A change to make the generated classes public has been checked in and it should be contained in the next release of the ASP.NET 5 VS drop.

@sayedihashimi
Copy link
Contributor

Should be fixed in the next release, closing now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants