muysal

I am trying to use NMock with VSTS Unit testing. I have referenced nmock.dll locally. When I run the tests, all the tests are aborted. Below is an extraction from the error report.

Microsoft.VisualStudio.TestTools.TestManagement.ExecutionException: Test Run deployment issue: The location of the file or directory "%LOCALDISKPATH%nmock.dll' is not trusted.

I tried to use the DeploymentItem attribute as


[DeploymentItem(@"%LOCALDISKPATH%nmock.dll")]

 
or

[DeploymentItem("nmock.dll")]

 
both won't work. I have full trust on local and the %LOCALDISKPATH% as name implies a local hard drive.

Why am I getting the exception and more importantly how can I get rid of it

Thanks,



Re: Visual Studio Performance Tools (Profiler) ExecutionException when add a 3rd party reference

James Su

How did the your test run and where did you see the error you mentioned above I assume the error message you saw is in the Test Run Details. If so that means the location of the nmock.dll is not fully trusted.

So first, make sure the location for nmock.dll is fully trusted. Then run your tests and check in the deployment directory, the directory that is named with Run Id. Inside the directory there should be an Out directory and nmock.dll should be deployed there.





Re: Visual Studio Performance Tools (Profiler) ExecutionException when add a 3rd party reference

GalGolan

im also getting the same error when using the DeploymentItem attribute as follow:

[DeploymentItem(\\myserver\myshare\myfile.xml)]

[TestMethod()]

public void MyTest()

{

....

}

How do I make \\myserver\myshare trusted





Re: Visual Studio Performance Tools (Profiler) ExecutionException when add a 3rd party reference

garfield1969

I have the same problem. how do I make a folder on my local machine trusted