ionutpislar / obfuscar

Automatically exported from code.google.com/p/obfuscar
0 stars 0 forks source link

Embedded resource causes exception after obfuscation #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a C# Windows Form application
2. Go to project Properties - Resources, add a Resource string
3. Create a test Form and a button, MessageBox.Show the Embedded resource 
string

What is the expected output? What do you see instead?

Expected result: the embedded resource string can be retrieved / shown.

Unexpected result: System.Resources.MissingManifestResourceException: 
Could not find any resources appropriate for the specified culture or the 
neutral culture.

What version of the product are you using? On what operating system?

Obfuscar release v1.3.2 in Visual Studio 2008

Please provide any additional information below.

Original issue reported on code.google.com by g...@dotnetsharp.com on 13 Mar 2009 at 5:37

GoogleCodeExporter commented 8 years ago
i'm using v1.4.0 and Visual Studio 2008 and getting also an exection when 
referencing
 a Resource string.

Original comment by cdefg...@gmx.de on 11 Aug 2009 at 5:36

GoogleCodeExporter commented 8 years ago
Obfuscar renames embedded resources, if they start with the same full name like 
an
obfuscated type. This is especially useful for the resources associated with 
Windows
forms, which start with the same name as the Form's type.
The resource designer of Visual Studio also names resource files after the 
class used
to access the resource contents. In this designer-generated class the resource 
is
referenced by a hard-coded string.
You could replace this string by something like 
typeof(MyResourceClass).FullName, but
this would be overwritten by the designer every time a resource string is added.

In the current version (1.5.2) there is some special code now, which searches 
for
this hard-coded string and replaces it with the obfuscated type/resource name.

Original comment by webbi...@gmail.com on 16 Nov 2009 at 8:53