How to get VS2010 to generate Resource.Designer.cs with an open constructor instead of an internal one?

Each time I edit a resource in resources.resx , Visual Studio restores Resource.Designer.cs with the constructor inside .

I need this public constructor. Is there any way to configure this?

+6
source share
2 answers

Follow these steps: Open the project properties (i.e. the one for which resources you want to publish). Click the "Resources" tab. Next to Top, you can see the DropDownList access modifier, and there you can choose Internal or Public. There he is:)

+7
source

I'm not sure if this is possible (public constructor) in Visual Studio by default, but you can try to solve your problem using Friend Assembly or by creating a wrapper class.

0
source

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


All Articles