Bug - Resources with case-conflicts

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Bug - Resources with case-conflicts

Postby ApocDev » Thu Mar 03, 2011 11:36 am

When obfuscating assemblies with resources using different casing (eg; zh-Hans and zh-hans) SA will overwrite one of them, causing them to be useless.

We have roughly 20 projects that are merged into the final exe via SA. So it took quite a while to figure out exactly where the bug was. I'm not sure if this is actually a bug with SA, or just that windows doesn't really care about casing at all.

Also; is there some form of bug tracker, or similar where I should be reporting bugs? (Luckily, we've only found 2 bugs to date, this one being the most annoying to figure out)
ApocDev
 
Posts: 10
Joined: Thu Sep 30, 2010 10:43 pm

Postby Chris.Allen » Fri Mar 04, 2011 12:51 pm

This really does look like an OS issue.

Forgive me but I do not understand the significance of case-sensitivity of sattelite resources. Perhaps the obvious question is- how does your system work, without smartassembly? (How do you get the file system to respect case-sensitivity such that no over-writing occurs). Could it be that seperate smartassembly projects are needed?
You can embed protected assemblies as well as merge- this may be how you can best workaround this.

>>Also; is there some form of bug tracker, or similar where I should be reporting bugs?

Not publically available, sorry, no. This forum works and, if necessary, we open a formal support ticket if you write to: support@red-gate.com
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby ApocDev » Fri Mar 04, 2011 2:44 pm

When our projects are not obfuscated, there is no issue, as Windows ignores the folder casing all together.

E.g; say you have 2 projects (Project1, and Project2)

Project1 uses zh-hans/Project1.resources.dll
Project2 uses zh-Hans/Project2.resources.dll

This is fine, as windows will create the folder for whichever is encountered first, and just place both DLLs in the same folder. (For the sake of argument, lets say it uses zh-hans)

This gives you;
zh-hans/Project1.resources.dll
zh-hans/Project2.resources.dll

However, when SA merges assemblies, it reads them as 2 "distinct" cultures (which they technically, are not), and will generate resources for zh-hans, then generate resources for zh-Hans, which overwrites "Project1"'s resources.

zh-hans/MergedProject.resources.dll
zh-Hans/MergedProject.resources.dll

Hopefully that shows where the issue is.

I hope that's more clear.
ApocDev
 
Posts: 10
Joined: Thu Sep 30, 2010 10:43 pm

Postby Chris.Allen » Fri Mar 11, 2011 3:35 pm

OK, thank you. Please do not merge or embed the satellite assemblies as it's known that this breaks their loading. Sorry.
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 1 guest