8

I have a solution named 'mySolution' with two projects:

  • ProjectA
  • ProjectB

ProjectA contains a resource file named 'mySolutionResources.resx'.
ProjectB refrences projectA, but can't access resources in mySolutionResources.

After some research I found that: "resource classes are all marked as internal".

My question now is:

If I want to maintain only one 'mySolutionResources.resx', how can I do to get access to it from projectB? If it is not possible, is there another aproach ?

Nicholas Post
  • 1,857
  • 1
  • 18
  • 31
Juan Pablo Gomez
  • 5,203
  • 11
  • 55
  • 101

2 Answers2

10

If you open the 'mySolutionResources.resx' (in designer) and on top you will see option of Access Modifier: [Internal]. You can change this value to [Public]. This should expose the resource data to other projects if referenced.

PazDev
  • 1,017
  • 9
  • 12
1

Rather than sharing resx files, I would prefer to write code in one assembly to expose the resources externally (depending on the nature of the resources). If you don't want that 'sharing' code to be public, you could always use InternalsVisibleTo

Нет войне
  • 1,139
  • 1
  • 11
  • 21