web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Error during adding a reference to a dll to a project

(0) ShareShare
ReportReport
Posted on by 700

Hi Folks,

When I run a class in D365FO I get an error message saying.

"System.IO.FileLoadException: System.IO.FileLoadException: Could not load file or assembly 'WebDriver, Version=2.42.0.0, Culture=neutral, PublicKeyToken=1c2bd1631853048f' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)."

I have a reference "WebDriver.dll" added to my project. The version was 3.8.0.0. I changed the version of this reference from 3.8.0.0 to 2.42.0 through "VS -> Tools -> Nuget Package Manager -> Manage NuGet Packages for Solution" so that the versions matched.

Do I have to change something else to solve the problem?

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    Can you please explain what exactly are you doing? Is WebDriver used by a C# project referenced from an X++ project, or what else have you done?

  • OrangeRocks Profile Picture
    700 on at

    Yes, I use a C# test from task recording under VS -> Dynamics 365 -> Create a c# perf test from recording to run a load test (this one: docs.microsoft.com/.../perfsdk-tutorial)

  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    I'm confused. I thought you said you got the error when running a class in AX, while now it sounds like you're running a C# test project. Can you please explain once more what you're running and how and where it fails?

  • OrangeRocks Profile Picture
    700 on at

    Ok, that's the second one:  a C# test from task recording

  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    All right, so it's about C# development and not about running a class in AX.

    Can you please tell us how are you running the test and when does it fail?

  • OrangeRocks Profile Picture
    700 on at

    I run the test from Visual Studio from Test explorer window.

    The exception occurs on this line: Client.Company = WellKnownCompanyID.USMF.ToString();

    And the stack trace looks as follows:

    StackTrace:

          at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.Browser.SeleniumBrowser.LaunchWithAuthentication(Uri targetUri)

          at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.Browser.AuthenticatedBrowser.CreateSession(SupportedBrowser browser, IAuthenticator authenticator, Uri launchUri)

          at Microsoft.Dynamics.TestTools.Dispatcher.JsDispatcher.OpenPipeline()

          at Microsoft.Dynamics.TestTools.Dispatcher.JsDispatcher.OpenClient(ClientState initialState, ClientBehavior behavior)

          at Microsoft.Dynamics.TestTools.Dispatcher.Client.DispatchedClient.SetClientState(ClientState state)

          at Microsoft.Dynamics.TestTools.Dispatcher.Client.DispatchedClient.set_Company(String value)

          at MS.Dynamics.Performance.Application.TaskRecorder.myPerfTest_PAM.TestSetup() in C:\PerfSDK\SampleProject\PerfSDKSample\myPerfTest_PAM.cs:line 50

  • Vigneshvaran Profile Picture
    354 on at

    Hi Martin,

    I need to do the Performance testing using task recorder in Dynamics 365 FO 8.1 with platform update 23.

    I followed the steps which is given in the below mentioned link.

    docs.microsoft.com/.../perfsdk-tutorial-lbd

    But in this link they provide the CloudEnvironment file details which is only applicable upto D365 FO 7.3 with platform update 15.

    D365 FO 8.1 with Platform update 23 ask the client app id details in CloudEnvironment file.

    what should i do?

    and another onething if give the details of client appid and secret keys then during run the test the below mentioned error occurs.

    MS.Dynamics.Performance.Application.SCM.CreatePurchReqBase.CreatPurchReq threw exception:

    System.IO.FileLoadException: Could not load file or assembly 'WebDriver, Version=3.13.1.0, Culture=neutral,

    PublicKeyToken=1c2bd16353048f' or one of its dependencies. The located assembly's manifest definition

    does not match the assembly reference. (exception from HRESULT:0x80131040)

    Thanks in advance,

    K. Vigneshvaran

  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    Please create a new thread for the question about CloudEnvironment file, because it doesn't belong to the thread named "Error during adding a reference to a dll to a project". But before you do that, notice that the link is for on-premises environments. It's not clear whether you have an on-premise deployment or not.

    I would review the version of WebDriver assembly and if it's all right, I would use Assembly Binding Log Viewer to identify the cause.

  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    Aham, vigneshvaran already duplicated the question in a separate thread, therefore the discussion should continue there and not here.

  • Vigneshvaran Profile Picture
    354 on at

    anywhere is okay martin.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans