VS2005 ArgumentException with GetString

M

MikeB

Hello,

I have a compact framework project that was built in VS2003 and I'm trying
to now use that project in VS2005. It seemed to import OK, compiles, but
I'm getting "ArgumentException was unhandled" on this line of code:

Me.TableView1.Text = rm.GetString("Tables")

I don't know where to start, as there are no such problems with the same
code in VS2003. Here's my initialization of the
System.Resources.ResourceManager rm:

rm = New
System.Resources.ResourceManager("My_Project.Strings",System.Reflection.Assembly.GetExecutingAssembly())

My file Strings.resx seems to be there, and it does have an entry called
"Tables". Thank you for any suggestions you might have.

Mike B.
 
D

Daniel Moth

Resource file format has changed with VS2005 so make sure your original resx
went through the upgrade wizard and not just added:
http://www.danielmoth.com/Blog/2005/08/resx-compatibility-for-smart-device.html

Also note that there is a new ResourceManager class you can use with VS2005
projects... autogenerated for you giving you compile time checking of
resource names you use. I refer to that and provide links in the 3rd para
here:
http://www.danielmoth.com/Blog/2005/05/my-project-properties.html

You can check the full resource names by using in debug:
Assembly.GetExecutingAssembly().GetManifestResourceNames()

If you are still having problems, please post a full repro...

Cheers
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top