REPL was unable to load Xamarin.ZUTest.dll

I want to create a UI test for my Xamarin.Android application but whenever I call the app.Repl(); mehtod, the console opens and shows me the following error:

I tried several versions of the Xamarin.UITest package (0.7.1, 1.0.0 and the pre-releases) but none of them worked.
It drives me crazy since hours.

Any ideas?

Best Answer

  • Glenn.WilsonGlenn.Wilson US Xamurai
    Accepted Answer

    @einRobby yes those help. The output Android test running Xamarin.UITest version: 1.1.1 you show above and in the log file indicate that you are running UITest version 1.1.1 and not version 1.1.1.251-dev (or newer) where the fix is. You have not updated (successfully) to the newest package, so it makes sense that you would still see the issue.

    When I run, for example, using version 1.1.1.252-dev, I see Android test running Xamarin.UITest version: 1.1.1.252.

    Either the package is still there and referenced or somehow there is a rogue reference to the old DLL.

    To update to the newest, you could try:
    Do a clean build of your UITest project.
    Delete the bin and obj folder in your UITest project.
    Remove the package (using the IDE) Xamarin.UITest from the UITest project.
    Delete the package folder(s) for Xamarin.UITest.
    Check your UITest csproj file to make sure there is no reference to a Xamarin.UITest.DLL.
    Rebuild your UITest project. That should fail. If it doesn't you still have a reference to a Xamarin.UITest DLL somewhere you need to find and remove.
    Now add back in the package (using the IDE) Xamarin.UITest, select include pre-release and get the newest such as Xamarin.UITest 1.1.1.252-dev.

    Normally the process is much simpler than that. And, all of the above should not be necessary but it includes some overkill to try to find the elusive reference.

Answers

  • JohnHardmanJohnHardman GBUniversity mod

    @einRobby - Just a guess, but is it possible your test project is referencing more than one version of the UITest libraries?

  • einRobbyeinRobby USMember

    Thanks for your answer, John, but no, I don't think that is is possible to reference more than one version at the same time. Even after deleting all packages, restoring them and rebuilding the solution the error still exists. My packages.config file also looks fine...

  • I have the same problem. I'm working on a Windows 7 with Xamarin Studio 5.9.6
    I tried some new versions (1.0.0.222 and 10.0.246) but they doesn't work. When I continue, the tree command show nothing, so impossible to use REPL.
    Do someone have any fix for this?

  • FrankMarkovich.6785FrankMarkovich.6785 USUniversity ✭✭

    I use Xamarin Studio on a MacBook and it's working fine, but I launched the same UITest project on Windows7 and also got this error.

  • Got the same issue here.

  • MikhailMelnikMikhailMelnik AUMember ✭✭

    Rolled back Xamarin.UITest to 0.7.2 and this has fixed the issue.

  • PhatVoPhatVo USMember
    edited September 2015

    Thank you ! It fixed . But bug of the old version appear... omg...

  • Glenn.WilsonGlenn.Wilson USXamarin Team Xamurai

    @einRobby @BasileTCHOUGANG @FrankMarkovich.8898 @SebastianGhring @MikhailMelnik @PhatVo
    I was able to reproduce this behavior using Xamarin Studio on Windows. There is a fix for this in the latest pre-release Xamarin.UITest nuget package: 1.1.1.251-dev.

  • Thank you @Glenn.Wilson, it works perfectly !

  • einRobbyeinRobby USMember
    edited September 2015

    Hi @Glenn.Wilson and thank you for your support! Unfortunately updating to 1.1.1.251-dev does not solve the problem for me.

    I figured out something that is even more strange: At the attached screenshot below you can see two projects that are completely identical. Both are the default start projects from creating a new Xamarin.Android solution. In both projects I just added app.Repl(); to the BeforeEachTest method. Nothing more.

    The project at the right runs perfectly, the one at the left gives the same error as described in my first post. Same with version 1.1.1.251-dev. So maybe this error does not depend on something in the NuGet package but an error somewhere else in the project or even in Xamarin Studio?

    The only thing I noticed is that the right instance of Xamarin Studio recognizes that there are package updates available and the left one doesn't. But this went away after a XS restart. The error was still there...

    If you need any further information or the project-files to solve this problem please feel free to contact me!

  • Glenn.WilsonGlenn.Wilson USXamarin Team Xamurai

    @einRobby "Unfortunately updating to 1.1.1.251-dev does not solve the problem for me."

    In that case I would suspect a configuration issue: most likely somehow referencing a DLL with the problem.

    Add .Debug() to your ConfigureApp. Run your test and just quit from the REPL window. In the Test Results>Output window there should be a line like:
    Android test running Xamarin.UITest version: 0.7.1
    What do you see there?

  • einRobbyeinRobby USMember

    Hey @Glenn.Wilson, at my output window the line Android test running Xamarin.UITest version: 1.1.1 appears. Does that help you?

  • einRobbyeinRobby USMember

    You can find the full log file attached. Hope that helps to find the problem.

  • Glenn.WilsonGlenn.Wilson USXamarin Team Xamurai
    Accepted Answer

    @einRobby yes those help. The output Android test running Xamarin.UITest version: 1.1.1 you show above and in the log file indicate that you are running UITest version 1.1.1 and not version 1.1.1.251-dev (or newer) where the fix is. You have not updated (successfully) to the newest package, so it makes sense that you would still see the issue.

    When I run, for example, using version 1.1.1.252-dev, I see Android test running Xamarin.UITest version: 1.1.1.252.

    Either the package is still there and referenced or somehow there is a rogue reference to the old DLL.

    To update to the newest, you could try:
    Do a clean build of your UITest project.
    Delete the bin and obj folder in your UITest project.
    Remove the package (using the IDE) Xamarin.UITest from the UITest project.
    Delete the package folder(s) for Xamarin.UITest.
    Check your UITest csproj file to make sure there is no reference to a Xamarin.UITest.DLL.
    Rebuild your UITest project. That should fail. If it doesn't you still have a reference to a Xamarin.UITest DLL somewhere you need to find and remove.
    Now add back in the package (using the IDE) Xamarin.UITest, select include pre-release and get the newest such as Xamarin.UITest 1.1.1.252-dev.

    Normally the process is much simpler than that. And, all of the above should not be necessary but it includes some overkill to try to find the elusive reference.

  • einRobbyeinRobby USMember

    Hey @Glenn.Wilson. Wow, that finally worked. After removing everything that had to do with the package, removing the package itself and it references and readding all this it finally works now. Thank you very much for your patience and support!

  • PhatVoPhatVo USMember

    It worked !! Thank you !!!

  • PaulReadPaulRead GBMember ✭✭

    How long before Xamarin.UITest version: 1.1.1.252' is expected to be released?

  • Glenn.WilsonGlenn.Wilson USXamarin Team Xamurai

    @PaulRead if your question is when can you get the fix discussed above that is in Xamarin.UITest 1.1.1.252-dev, you can get it now.

    Remove the existing Xamarin.UITest nuget package from your project. Then add packages and select the "show pre-prelease packages". Search for Xamarin.UITest and select the newest available (as I write this it is 1.1.1.257-dev).

  • PaulReadPaulRead GBMember ✭✭

    Thank you, that sorted it!

Sign In or Register to comment.