System.IO.FileNotFoundException: Unable to find the code behind assembly

9 posts, 0 answers
  1. Adriane
    Adriane avatar
    28 posts
    Member since:
    Apr 2012

    Posted 04 Jul 2013 Link to this post

    Hi Telerik Team,

    I have a Test that runs with mstest in cruiseControl.
    Everything worked fine until I moved it to a subfolder.

    I can execute the Test within Telerik Stand alone and also with Visual Studio.
    If I put it in a TestList and execute this, I always get the error:

    '03.07.2013 19:33:42' - Using .Net Runtime version: '4.0.30319.296' for test execution. Build version is '2012.2.1527.0'.
    '03.07.2013 19:33:42' - Starting execution....
    '03.07.2013 19:33:42' - Detected a Silverlight Test. Setting EnableSilverlight=True
    '03.07.2013 19:33:44' - Detected custom code in test. Locating test assembly: MS_Testfaelle.dll.
    '03.07.2013 19:33:44' - Failure detected during execution. Details:
    ------------------------------------------------------------
    '03.07.2013 19:33:44' - System.IO.FileNotFoundException: Unable to find the code behind assembly. Please make sure you have compiled your code behind without errors before attempting to execute the test. Looking for: D:\SVN\DMM\DEV\DOTNET\S4M.DMM\QA\VPMS_Releases\AutomatisierteTests\MS_Testfaelle_FED\TestResults\dmmqatester_S4M01923 2013-07-03 19_32_47\Out\MS_Testfaelle.dll
    If you are running VS 2010, make sure Deployment is checked in your .settings file (in the solution items)
       at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.EnsureAssemblyExists(String assembly, String folder)
       at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.CreateCodedTestInstance(Test test, TestResult result, String binariesFolder)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)

    I am running Visual Studio 2010 but where do I find the settings file?

    Other tests in the same assembly are working perfect.
    I also created a new Testlist, didn't change anything.
    I also copied the tests that are not working, but didn't change anything.

    (I saw some things in the forum, but they did not help  - for example everything have a friendly name in the elements... )

    Do you have some ideas what might be wrong with the tests I moved?

    Best regards,
    Adriane


  2. Velin Koychev
    Admin
    Velin Koychev avatar
    88 posts

    Posted 08 Jul 2013 Link to this post

    Hi Adriane,

    I am sorry you are experiencing this problem. 

    If you are using Visual Studio and Test View to execute your tests, please ensure that Deployment is enabled and that all the supporting tests are included in the deployment list. See the attached screen shots.

    To create a Test Settings file in Visual Studio, right click Solution Items and select Add > New Item. Click Test Settings under Installed Templates, customize the name if desired, then click Add.

    Please also check whether this path 'D:\SVN\DMM\DEV\DOTNET\S4M.DMM\QA\VPMS_Releases\AutomatisierteTests\MS_Testfaelle_FED\TestResults\dmmqatester_S4M01923 2013-07-03 19_32_47\Out\MS_Testfaelle.dll' is correct. (i.e. does it actually lead to the intended dll file?).

    Looking forward to hearing from you.

    Regards,
    Velin Koychev
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Adriane
    Adriane avatar
    28 posts
    Member since:
    Apr 2012

    Posted 08 Jul 2013 Link to this post

    Thank you for the detailled explanation.

    I found the problem, that the file is not here:
    'D:\SVN\DMM\DEV\DOTNET\S4M.DMM\QA\VPMS_Releases\AutomatisierteTests\MS_Testfaelle_FED\TestResults\dmmqatester_S4M01923 2013-07-03 19_32_47\Out\MS_Testfaelle.dll

    The problem is that I have a lot of Testlists in that project and everytime I have the file in the output directory, only within this one testlist it is missing.I never had that testsettings-file, but it was working with all testlists.

    So I am not sure how this could help because this is a project setting file and would relate to all tests and testlists in the porject. (I have a lot of other projects, where I also do not have this setting file and is working)

    Within the deployment items it looks the same for these tests and the working ones - see attachment.
    So I wonder why the MS_Testfaelle.dll is not deployed in the output folder. Do you have another idea what might happen here?

    Best regards,
    Adriane
  4. Velin Koychev
    Admin
    Velin Koychev avatar
    88 posts

    Posted 11 Jul 2013 Link to this post

    Hi Adriane,

    The reason why you haven't experience this issue before is probably because your other tests did not need this dll file.
    Could you please try to enable the deployment in the test settings file and let me know if this helps.

    Looking forward to hearing from you.

    Regards,
    Velin Koychev
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. Adriane
    Adriane avatar
    28 posts
    Member since:
    Apr 2012

    Posted 11 Jul 2013 Link to this post

    Hi Velin,

    thanks for the reply, it did not help to activate the deployment.

    By the way, the other tests ALL need this dll and it is copied in all other tests! All tests are in the same project and this is the project.dll and we have no other dlls needed for these tests.

    I just build it more and more times and tried executing without changing anything and from one moment it works, I cannot explain this, because I did change the testsettings and because it did not work delete it, then it did not work. I tried then many times without changing from this point but it worked.

    So I think we can close this ticket, but solution is not clear for me.

    Best regards,
    Adriane
  6. Velin Koychev
    Admin
    Velin Koychev avatar
    88 posts

    Posted 15 Jul 2013 Link to this post

    Hello Adriane,

    I have to say that this is indeed very strange behavior.

    If you experience the same problem again, please contact us,  in order to investigate further what was the cause of this issue. 

    Regards,
    Velin Koychev
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  7. Siva
    Siva avatar
    28 posts
    Member since:
    Apr 2012

    Posted 28 Oct 2013 Link to this post

    I have the same issue. looking for dll in diffrent places.
    sometimes tests executed without any issue, but some times it says file not found exception. It is serious issue for me, iif i do the rerun then it pass, appriciate the right solution.


    Thanks
  8. Velin Koychev
    Admin
    Velin Koychev avatar
    88 posts

    Posted 31 Oct 2013 Link to this post

    Hello Siva,

    I am sorry to hear that  you are experiencing this issue.

    You might be hitting a known issue, which was fixed in the latest internal build we released(v2013.1.1002). In order to avoid this you will need to upgrade your Test Studio up to the latest internal build that you can find here. Please note that you will need to upgrade the Run-Time on your execution machine as well. Here is the installer file for the Run_Time.

    Another thing you might try is to navigate to your project's folder, then go to the Bin folder and delete the files there, they should be two files named the same way as your project but with different extensions, they will be created again automatically. Then please try running your test list.

    Another thing that you may try, this is in case you are using any external dll's in your project. Please copy those dlls into the project folder and add the references from there.

    If none of these help:
    1) Please send us the application log when this problem happens. Clear it first and then reproduce the issue.
    2) Please provide us with a copy of your tests so we can reproduce the issue on our end and give you a solution. 

    Hope to hear from you soon.

    Regards,
    Velin Koychev
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  9. Robin
    Robin avatar
    1 posts
    Member since:
    Mar 2015

    Posted 05 Aug 2015 Link to this post

    Hi Everybody,
    if you get the same issue you just have to copy the dll into you main-folder or your bin folder, this will solve the problem.

    Greetings
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!