2

I am seeing three instances of this warning when MSTest is executed on our build server as part of our CI build and Test. This is causing all our unit tests to fail on the server.

Warning: Test Run deployment issue: The assembly or module 'MySql.Data' directly or indirectly referenced by the test container 'pathToOur.test.dll' was not found.

Warning: Test Run deployment issue: The assembly or module 'Npgsql' directly or indirectly referenced by the test container 'pathToOur.test.dll' was not found.

Warning: Test Run deployment issue: The assembly or module 'System.Data.SQLite' directly or indirectly referenced by the test container 'pathToOur.test.dll' was not found.

I cannot find anywhere in our solution that references either of these three components. They do not exist on the build server so I can't just add them to the GAC. Moreover, they are not present in my local machine, which builds the solution and runs all tests with no problems.

Any help or advice in tracking down these references and/or how to prevent them impacting on the CI Build and Test would be appreciated.

Phil Cole
  • 91
  • 1
  • 9
  • Take a look at this and see if any of the suggestions works for you https://stackoverflow.com/questions/5481120/mstest-cannot-find-the-assembly – Nkosi Apr 23 '18 at 09:50
  • @Nkosi - Thanks for that, but nothing there has helped. My problem is that I can find nothing in my solution that references those components so am confused that MSTest is looking for them. I cannot add them to the GAC because I don't have them. Similarly they cannot be tagged as a DeploymentItem as they are not present on the server to be deployed. I'd really like to know what is actually holding the reference to these components because whatever it is, is probably misconfigured. I don't feel that I should be adding unused dlls to my solution simply to satisfy some dodgy references. – Phil Cole Apr 23 '18 at 13:29
  • Do a search for any mention of those names in the project files and see if you find any, – Nkosi Apr 23 '18 at 13:34
  • @Nkosi - No, nothing in project or solution files. Already done all of that. But, running FINDSTR search across all files in my solution thew up some hits in the Elmah.dll (We use Elmah for logging in our app.) So maybe this is where the references are coming from. – Phil Cole Apr 23 '18 at 14:17
  • That sounds about right. – Nkosi Apr 23 '18 at 14:21
  • 1
    @MichaelFreidgeim are you on a hunt for those similar GAC issues today? ;) – Tatranskymedved Dec 18 '20 at 13:54

1 Answers1

1

To my mind this seems something of a hack, but it has resolved the issue for me.

Having identified that Elmah.dll contained text that corresponded with all three of the components that MSTest was failing to find. I pulled down the binaries for the missing dlls from the Elmah Downloads page.

I dropped them into a folder on our build server and then added them all to the GAC.

The automated unit tests in our solution then performed without errors as part of subsequent CI code check in actions.

Phil Cole
  • 91
  • 1
  • 9