For Each t As Type In common.GetTypes() If name = t.Name And ns.StartsWith("http://www.mydomain.com/Namespace") Then If Not nameSpaceImported Then mainNamespace.Imports.Add(New CodeNamespaceImport("Common")) nameSpaceImported = True End If Return t.FullName End If Next