Resource Naming- just a tip

Topics: Mobile Client Software Factory
Nov 2, 2006 at 12:24 AM
originally posted by: Faraz_Mahmood

wel i have came across the resource naming issue a few weeks back, we have our own project and source code hierarchy, which is a bit different from what VS expects. when i integrated the OAC into my application, the designer started complaining about the file location , i commented the code for designer which performs this check,
now when i run the application , the resources weren't loading correctly , i found that VS expects a certain heirarchy corresponding to the Classes in your source code, and thus generating the resource name incorrectly ,
luckily i found that <LogicalName></LogicalName> tag for the resource will generate the desired name for the resource, now the application works fine,

but one thing is that you still need to manually edit the project file to insert these logicalName tags,

any idea if i can add this feature while adding resource to the project file in the desginer code.

Nov 2, 2006 at 3:16 AM
originally posted by: dcazzulino

Can you share a snippet of that logicalname as it reads on the .csproj?
It's definitely a very good tip!
Nov 2, 2006 at 12:35 PM
originally posted by: Faraz_Mahmood

following is a snippet from my csproj file,

our source code start with a root folder named "SharesensePlatform" where lies all the solutions and project files, (we are keeping solution and project files at the same level and same folder. Right under SharesensePlatform we have "src" folder which is the root for all the source code ,which is the one where the path start in the following snnipet.

without this logical name tag , the follwoing resource would be named as "PDSR.ShareSense.src.PDSR.ShareSense.Client.Mobile.Controls.Views.DashboardView.480-640.resources"

<EmbeddedResource Include="src\PDSR.ShareSense\Client\Mobile\Controls\Views\DashboardView.480-640.resx">

i found this tip from msbuild discussion forum on channel 9, i have also blogged it on my blog with some more details,!C030FFCB82DA9C8D!272.entry