Iam writing a test method (in a .Net Test Project) and i need to access a resorce file that is in another Project of the Solution.
Of course it is “impossible” because, by definition, Resorce Files have constructors with internal access level, see the example:
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Mensagens {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Mensagens() {
}
Is there any Workaround for this?
Ok, i need to confess. I found the solution before pos the question.
However, i post the question. It could be useful for someone.
Just open de ResourceFile.Resx (double click) and at top of grid with the properties and values, change the Access Modifier to Public