VB.NET Compiler Ignores Folder Structure in Web Resource Naming - by David DeLella

Status : 


Sign in
to vote
ID 789998 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 6/12/2013 9:36:59 AM
Access Restriction Public


When creating a custom ASP.NET server control the user might need to add web resources to his control library.  By adding a resource to the assembly file it is possible to embed resources.  In C# the naming for these resources is: Namespace.Folder.FileName.  However, the VB.NET compiler does not recognize resources the same.  The Folder portion of the naming is omitted.  This causes a major problem if you have multiple resources with the same name but in different sub-folders.  A good example is themes.  You might have 2 or more themes with files all named the same but divided by folder structure.  This is not possible using VB.NET to create the control library.  This apparently has been a problem since VB.NET began and needs to be fixed.
Sign in to post a comment.
Posted by Levi [MSFT] on 6/27/2013 at 11:25 AM
We looked into this further, and it appears to be a by-design behavior of how resources are pulled into VB projects. The recommended solution would be simply to update your web application to account for the difference in naming convention.
Posted by Helen [MSFT] on 6/17/2013 at 1:41 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by David DeLella on 6/13/2013 at 12:06 PM
I attached a sample project to this case. In the Smiley control code there are some comments and both working and not-working lines of code. The zip file attached currently display a non-functional condition which does not recognize the Images folder name in the resource namespace naming. In C# the folder name must be included in the naming. If you comment out the lines with the Images folder (one assembly line and the ImageURL assignment line) and uncomment the other web resource lines without the Images folder name it will work.
Posted by Helen [MSFT] on 6/13/2013 at 12:08 AM
I am having trouble reproducing your issue. Can you share a sample project on which you are seeing this problem?

Posted by Macy [MSFT] on 6/12/2013 at 9:54 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)