473,385 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Obfuscated code problem

Bry
I'm trying Obfuscation for the first time using the community edition
of dotfuscator that ships with vs .net 2005.

After building my code, I load the compiled .exe into dotfuscator and
let it run. When I try to execute the obfuscated code, I received an
exception. When I debug using vs .net, It reports the following
exception.

Could not find any resources appropriate for the specified culture or
the neutral culture. Make sure
"TestApp.Properties.Resources.resources" was correctly embedded or
linked into assembly "TestApp" at compile time, or that all the
satellite assemblies required are loadable and fully signed.

I assume i am missing something obvious, can anyone help?

Thanks,
Bry.

Nov 17 '05 #1
4 7480
Hi Bry,
are you running this app in a different language/culture login for the OS
that what you used to develop. Probably the culture of the main thread is
set to a culture for which you don't have a resource file, try putting
something like this in your main load method:

System.Threading.Thread.CurrentThread.CurrentUICul ture =
System.Globalization.CultureInfo.CreateSpecificCul ture("en-us");

or whatever culture your app was created using, you should not have this
problem after doing that.

Hope that helps
Mark R Dawson
http://www.markdawson.org

"Bry" wrote:
I'm trying Obfuscation for the first time using the community edition
of dotfuscator that ships with vs .net 2005.

After building my code, I load the compiled .exe into dotfuscator and
let it run. When I try to execute the obfuscated code, I received an
exception. When I debug using vs .net, It reports the following
exception.

Could not find any resources appropriate for the specified culture or
the neutral culture. Make sure
"TestApp.Properties.Resources.resources" was correctly embedded or
linked into assembly "TestApp" at compile time, or that all the
satellite assemblies required are loadable and fully signed.

I assume i am missing something obvious, can anyone help?

Thanks,
Bry.

Nov 17 '05 #2
SP

"Bry" <br*********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I'm trying Obfuscation for the first time using the community edition
of dotfuscator that ships with vs .net 2005.

After building my code, I load the compiled .exe into dotfuscator and
let it run. When I try to execute the obfuscated code, I received an
exception. When I debug using vs .net, It reports the following
exception.

Could not find any resources appropriate for the specified culture or
the neutral culture. Make sure
"TestApp.Properties.Resources.resources" was correctly embedded or
linked into assembly "TestApp" at compile time, or that all the
satellite assemblies required are loadable and fully signed.

I assume i am missing something obvious, can anyone help?


It may not be something obvious. I recently had a very similar error
occuring because a third party control was causing an exception which was
causing a message box to display. The message box required culture info and
the error manifested with the same "resources" error. It could be that you
have "over" obfuscated and are getting an error because of this. Do you use
reflection or have any code where the type's name is used for comparison
like GetType.ToString() == "MyType".

SP
Nov 17 '05 #3
Bry
Thanks for the info.

Mark : I've tried adding the line you suggested, but I still receive
the same error.

SP : Interesting point about the type name, I presume obfuscation can't
deal with this?
From the info you have both supplied, I thought it would be worth

trying to add some rename exclusions, so I worked through all the
options, running the obfuscation and then trying the code. I found the
section that the obfuscation was causing a problem with, and drilled
down deeper until I got to the lowest level. I have now excluded that
part from obfuscation. For information, the part of my code I had to
exclude was

TestApp.Exe
+-TestApp.Properties
+-Resources

There is nothing in this part of the code that I really want to
obfuscate.

Many thanks for your help.

Nov 17 '05 #4
Bry wrote:
I'm trying Obfuscation for the first time using the community edition
of dotfuscator that ships with vs .net 2005.

After building my code, I load the compiled .exe into dotfuscator and
let it run. When I try to execute the obfuscated code, I received an
exception. When I debug using vs .net, It reports the following
exception.

Could not find any resources appropriate for the specified culture or
the neutral culture. Make sure
"TestApp.Properties.Resources.resources" was correctly embedded or
linked into assembly "TestApp" at compile time, or that all the
satellite assemblies required are loadable and fully signed.

I assume i am missing something obvious, can anyone help?


with obfuscation, always exclude nested types and properties which are
bound to controls and also resources which you use in a named fashion.
This is because the names change after obfuscation, so at runtime the
elements have different names but your code refers to them with the old
names.

Frans

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: fix | last post by:
Hello, i need to protect my xsl file. In my xsl i have a mechanism for defining a personal stylesheet, what i want to do is, if it possible, find a mechanism for Obfuscated the xsl source code ....
1
by: assaf | last post by:
hi all i am using PreEmptive Solutions dotfuscator (community edition). and i am getting 'TypeLoadException' for a simple interface that i defined. how can i debug an obfuscated application? ...
0
by: daechulsohn | last post by:
Just thought I would contribute some knowledge for a change. After hours tracking down a problem with obfuscated code, where we were getting the exception : System.TypeLoadException: Method a...
4
by: Paul E Collins | last post by:
For those who appreciate such things, here's a bit of obfuscated C# I knocked up in a spare moment at work. http://CL4.org/comp/jabberwocky.txt P. -- www.CL4.org
35
by: +-={K-SoL}=-+ | last post by:
when I try to reference 2 obfuscated libraries at the same time visual studio gives me a compilation error since the obfuscator has converted some name spaces to a and b in both libraries, now I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.