Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSTest cannot find the assembly

I was using MSTest

and i use command mstest /testsettings:local.Testsetting /testcontainer:folder\obj\Debug\test.dll

and this is the output,

Run has the following issue(s): Warning: Test Run deployment issue: The assembly or module 'Microsoft.Practices. Prism' directly or indirectly referenced by the test container 'test.dll' was not found. Warning: Test Run deployment issue: The assembly or module 'Project.Common.dll' directly or indirectly referenced by the test container 'test.dll' was not found. Warning: Test Run deployment issue: The assembly or module 'Project.Infrastructure.dll' directly or indirectly referenced by the test container 'test.dll' was not found. Warning: Test Run deployment issue: The assembly or module 'Microsoft.Practices. Prism' directly or indirectly referenced by the test container 'test.dll' was not found.

What can i do so MSTest can run well.

like image 410
aeruL Avatar asked Mar 30 '11 02:03

aeruL


2 Answers

All assemblies that are not used directly in test will not be copied to test folder. Therefor, those test methods should be decorated with attribute like:

[DeploymentItem("Microsoft.Practices.Prism.dll")]

This solves the problem without adding the assembly to the GAC.

like image 184
Tal Segal Avatar answered Oct 13 '22 05:10

Tal Segal


You can install the Prism file in the GAC of your build server.

like image 31
Ewald Hofman Avatar answered Oct 13 '22 04:10

Ewald Hofman