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.

Re: VS2005 ArgumentException with GetString by Daniel

Daniel
Sun Dec 18 06:54:27 CST 2005

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
--
http://www.danielmoth.com/Blog/

"MikeB" <mboonept@yahoo.com> wrote in message
news:OlWp9T8AGHA.2356@tk2msftngp13.phx.gbl...
> 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.
>



Re: VS2005 ArgumentException with GetString by MikeB

MikeB
Sun Dec 18 16:49:02 CST 2005

Thanks Daniel, that got me on the right track.

Mike B.

"Daniel Moth" <dmoth74@hotmail.com> wrote in message
news:OF6RIJ9AGHA.3064@TK2MSFTNGP10.phx.gbl...
> 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
> --
> http://www.danielmoth.com/Blog/
>
> "MikeB" <mboonept@yahoo.com> wrote in message
> news:OlWp9T8AGHA.2356@tk2msftngp13.phx.gbl...
>> 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.
>>
>
>