tags:

views:

27

answers:

1

The program I'm working on reads ResX files and it fails to read this one particular resx file that has two assembly elements for the same name.

ex.

<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

<assembly alias="System.Windows.Forms" name="System.Windows.Forms">

are in the same resx file. When parsing the data element below the latter assembly a System.TypeLoadException is thrown. When I delete the latter one, there is no exception thrown.

+1  A: 

That's clearly an error/problem, though it's hard to know how it got there without more info. Remove the second (not fully-qualified) assembly definition, and all should work fine.

Noldorin
I talked to other people who worked on this project and apparently it apparently could've been because they were manually modifying that particular resx file. Also, thanks for the quick response!
dak
@dak: That would indeed be a cause of this problem! Glad it's resolved.
Noldorin