in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

FileLoadException

Last post 05-02-2008 10:22 AM by flipdoubt. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-30-2008 4:15 PM

    FileLoadException

    I'm developing the main executable of our app and other developers are submitting modules to integrate. The executable references FlexGrid 2.6.20072.339, but one of the developers submitted a module that references 2.5.20053.230. When the app loads this module, a FileLoadException complains "Could not load file or assembly 'C1.Win.C1FlexGrid.2, Version=2.5.20053.230, Culture=neutral, PublicKeyToken=79882d576c6336da' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)".

    I told the other developer to ensure her VS.NET references are setup such that Specific Version is false, which she claims to have done.

    What might cause a problem such as this? I figured out a work around, by configuring the app.config's runtime element to use 2.6.x over 2.5.x, but we want the root cause addressed.

    Here is the app.config code that fixes the issue:
      <runtime>
        <gcConcurrent enabled="true" />
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <publisherPolicy apply="yes" />
          <probing privatePath="lib" />
          <dependentAssembly>
            <assemblyIdentity name="C1.Win.C1FlexGrid.2" publicKeyToken="79882d576c6336da" />
            <publisherPolicy apply="yes" />
            <bindingRedirect oldVersion="2.5.20053.230" newVersion="2.6.20072.339" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
  • 05-01-2008 2:57 AM In reply to

    Re: FileLoadException

    Hello,
     
    To resolve the issue, you need to modify the License.licx file in the module applications.
     
    Normally, this file holds the following entry :
     
    C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.2, Version=2.5.20053.230, Culture=neutral, PublicKeyToken=79882d576c6336da
     
    However, we need to remove the Version, Culture and PublicKey Token information from it and leave the following information.
     
    C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.2
     
    Ask your other developers to modify the settings in each license.licx file in their module application, rebuild
    the entire project again. Once it is done and integrated in your main application issue should be resolved.
     
    License.licx file is located in the Solution explorer. In case you are unable to view it, you need to click
    on 'Show All Files' on the top of the Solution Explorer.
     
    I hope this helps.
     
    Regards,
     
    Allen Smith
     
    <flipdoubt> wrote in message news:204462@10.0.1.98...
    I'm developing the main executable of our app and other developers are submitting modules to integrate. The executable references FlexGrid 2.6.20072.339, but one of the developers submitted a module that references 2.5.20053.230. When the app loads this module, a FileLoadException complains "Could not load file or assembly 'C1.Win.C1FlexGrid.2, Version=2.5.20053.230, Culture=neutral, PublicKeyToken=79882d576c6336da' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)".

    I told the other developer to ensure her VS.NET references are setup such that Specific Version is false, which she claims to have done.

    What might cause a problem such as this? I figured out a work around, by configuring the app.config's runtime element to use 2.6.x over 2.5.x, but we want the root cause addressed.

    Here is the app.config code that fixes the issue:
      <runtime>
        <gcConcurrent enabled="true" />
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <publisherPolicy apply="yes" />
          <probing privatePath="lib" />
          <dependentAssembly>
            <assemblyIdentity name="C1.Win.C1FlexGrid.2" publicKeyToken="79882d576c6336da" />
            <publisherPolicy apply="yes" />
            <bindingRedirect oldVersion="2.5.20053.230" newVersion="2.6.20072.339" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>


    http://helpcentral.componentone.com/cs/forums/p/75120/204462.aspx#204462

  • 05-02-2008 10:22 AM In reply to

    Re: FileLoadException

    I won't have access to the other developer's code until Monday, but thanks for answering this question.
Page 1 of 1 (3 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.