Thank you for your response! I'm using VS.NET 2003.
I'll have to explain a little better.
In a c# project the namespace of embedded resources follows the folder
structure, but in a vb.net project it does not.
Example:
root namespace=Root
resource is "File.bmp" located in project folder "Div"
In c#, the resource name will be Root.Div.File.bmp,
but in vb it will be Root.File.bmp.
This is a problem if you have two folders in your project, both with a
File.bmp; in c# they will be distinguished by namespace, but in vb
you'll get a compilation error.
To make things more interesting, the .resource files that are embedded
in vb projects DO have namespaces that follow the folder path.
It would be interesting to know the story behind this behavior, but what
would be most helpful to me is a way to specify a namespace for embedded
resources, or to set an option so that the namespaces follows the folder
path like in c# projects.
Your suggestion to change the Rootnamespace would change the namespace
of the embedded resource, but still does not allow files of the same
name in different folders to be embedded in a vb project, while they can
be in a c# project.
Hope this clarifies things. As I think about the problem I think I
could probably switch to building with NAnt to solve this, but I'd
rather not go that far for this change.
Thanks!
Jason
Peter Huang [MSFT] wrote:
Hi
Which version VS.NET are you using, 2003 or 2005?
Based on my test, even if we create a folder named TestFolder, and put the
aspx page into the folder, after compilation, the namespace is still
Rootnamespace.filename.
I think the namespace is the logical organization, but the folder is just
the physical organization. Even we put two file with different namespace in
one folder, the namespace will not change.
I think in the project properties, we can set the Rootnamespace property,
so that we can change that to make the final namespace looks like
Root.TestFolder.filename.
If I have any misunderstanding, please feel free to post here.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.