VB.NET Problem

Aug 14, 2007 at 9:03 AM

I have BIG problems using StringResourceTool with my VB.NET project. The problem is in generation of namespaces.
When I keep "Custom Tool Namespace" property blank I got compile time error.
But when I set it, I got runtime error, informing that resources cannot be found.

May be my solution to this problem can be useful:
I have changed Process method of SRGenerator.CustomTool.Processor class at line 512 of Processor.cs file to following:
string resSpace = FileNameSpace != "" ? FileNameSpace + ".": "";
string classSpace = nSpace.Name != "" ? nSpace.Name + "." : "";
fResourceManager.InitExpression = new CodeObjectCreateExpression(typeof(ResourceManager),
new CodePrimitiveExpression(resSpace + options.ResourceName + ".srt"),
new CodePropertyReferenceExpression(
new CodeTypeOfExpression(classSpace + options.SRClassName), "Assembly"));

Now (with help of accessor_namespace attribute) everything works fine.

Please investigate the problem,
Robert Hovhannisyan
Oct 9, 2007 at 8:16 AM
Thank you, Robert!

I will investigate it!