dev [Solved] BadImageFormatException:

Home Forums EyeX Software Development dev [Solved] BadImageFormatException:

This topic contains 20 replies, has 3 voices, and was last updated by Profile photo of Grant [Tobii] Grant [Tobii] 2 days, 6 hours ago.

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #7259
    Profile photo of Grant [Tobii]
    Grant [Tobii]
    Moderator

    Hi @ysato, could you please report the file size of Tobii.EyeX.Client.dll in each output folder?

    64-bit version should be of size 1275kB, otherwise it is  849kB.

    Please also confirm if the following lines appear in the .csproj-file:

     
    Can you also kindly try to rebuild the project from scratch to make sure the correct files are copied?

    #7265
    Profile photo of 良治
    良治
    Participant

    \packages\Tobii.Interaction.0.7.3\build\AnyCPU\Tobii.EyeX.Client.dll 849KB
    \packages\Tobii.Interaction.0.7.3\build\x64\Tobii.EyeX.Client.dll 1,275KB
    \packages\Tobii.Interaction.0.7.3\build\x86\Tobii.EyeX.Client.dll 849KB

    I find the following lines in my csproj file when AnyCPU config. Only one line for import section.

    <Reference Include=”Tobii.Interaction.Model, Version=0.7.3.333, Culture=neutral, PublicKeyToken=70326046dcdce6cb, processorArchitecture=MSIL”>
    <HintPath>..\packages\Tobii.Interaction.0.7.3\lib\net45\Tobii.Interaction.Model.dll</HintPath>
    <Private>True</Private>
    </Reference>
    <Reference Include=”Tobii.Interaction.Net, Version=0.7.3.333, Culture=neutral, PublicKeyToken=70326046dcdce6cb, processorArchitecture=MSIL”>
    <HintPath>..\packages\Tobii.Interaction.0.7.3\lib\net45\Tobii.Interaction.Net.dll</HintPath>
    <Private>True</Private>
    </Reference>

    <Import Project=”..\packages\Tobii.Interaction.0.7.3\build\Tobii.Interaction.targets” Condition=”Exists(‘..\packages\Tobii.Interaction.0.7.3\build\Tobii.Interaction.targets’)” />

    I will try today to rebuild my project from scratch as 64bit app from the beginning.

    #7266
    Profile photo of 良治
    良治
    Participant

    I tried to create a new c# project with 64 target.
    I added NuGet Tobii Interaction package before any additional modifications.
    But the files under Tobii package are exactly the same a before.

    #7292
    Profile photo of Grant [Tobii]
    Grant [Tobii]
    Moderator

    Hi @ysato, apologies but we are having troubles here understanding why it is not working for you and we cannot reproduce the error here.

    The .Net assemblies referenced in Tobii Core SDK (Tobii.Interaction.Net.dll and Tobii.Interaction.Model.dll) are compiled with an AnyCPU config, so they shouldn’t pose a problem.

    Also, Tobii.EyeX.Client.dll is being correctly created and is different for each architecture. (as you can see the file size difference)

    Maybe you can try to copy the correct native dll to the output folder? Was there a chance to test on another computer?

    #7296
    Profile photo of 良治
    良治
    Participant

    >>you can try to copy the correct native dll to the output folder

    I succeeded to run both Tobii sdk and other 64bit dll under 64 config app.

    I checked projectfolfer/bin/debug/Tobii.EyeX.Client.dll. It was 32bit. I copied 64bit Tobii.EyeX.Client.dll to the folder.
    Then my app run as 64 bit.
    That must be a bug of Visual Studio 2015.

    Thanks for a long effort of your support.

    #7297
    Profile photo of Grant [Tobii]
    Grant [Tobii]
    Moderator

    Hi @ysato, okay great! Glad to hear you got it working 🙂

Viewing 6 posts - 16 through 21 (of 21 total)

You must be logged in to reply to this topic.