Default Namespace Issues

There seems to be some issues with using the tool in VB.NET 2003 when the Root Namespace setting is not the same as the Assembly name (also if it is set to empty string).

For one thing, the ml_resource_name() routine assumes that the AssemblyName is the prefix for the resource, but it is actually the RootNamespace. What is the best way to handle this?

This issue causes the exception:
An unhandled exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll
Additional information: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure ".MultiLang.resources" was correctly embedded or linked into assembly "WindowsApplication1".
baseName: .MultiLang locationInfo: <null> resource file name: .MultiLang.resources assembly: WindowsApplication1, Version=1.0.3205.23765, Culture=neutral, PublicKeyToken=null

Also, is there any way for this to work if the RootNamespace is set to an empty string?

When the root namespace is set to an empty string, I have a problem when adding the language selection form.

Germany

Firstly, to make it work I advise you to edit the contents of the MlString.cs file. The easiest way will be to remove the line
string strS = Assembly.GetExecutingAssembly().GetName().Name;
and to hard code the name of your assembly.

For VS 2005 I have introduced a different method, where the Add-In fetches the RootNamespace of the project and adds a line
private static string RootNamespace = "YourNamespace"
to MlString.cs, which is then used to open the resource manager. I did it this way, because I couldn't find a way to determine the RootNamespace at runtime, i.e. just using code in the template file.

Even this way will fail if the RootNamespace is an empty string, but that should be easy to fix with code in the template file for MlString.c.

This is one of the changes which I am currently merging back into the version for VS 2003.

Phil

Germany

I have finally uploaded a new version (4.01.0000) for VS 2003. The functionality I described is now integrated into this version.

Phil