# Referencing MS UnitTests

**URL:** https://www.finalbuilder.com/forums/t/referencing-ms-unittests/4943
**Category:** Discussion
**Created:** [April 14, 2013, 11:04am UTC](https://www.finalbuilder.com/forums/t/referencing-ms-unittests/4943 "2013-04-14T11:04:02Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![haggy](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/h/edb3f5/32.png) [@haggy](https://www.finalbuilder.com/forums/u/haggy)
#### Post date: [April 14, 2013, 11:04am UTC](https://www.finalbuilder.com/forums/t/referencing-ms-unittests/4943/1 "2013-04-14T11:04:02Z")

</div>

Hi

&nbsp;

I'm not quite sure how i can reference MS Tests .

I build one solution which have a a Code Project named **Foo** and a Test Project named **Foo.Tests** Project.

In which path are the resulting assemblies stored?

&nbsp; tried using the wildcard

\*\*.Tests.dll

&nbsp;But the build tells me the dll was not found.

Also I'm using 2 stages, the first stage makes the build, the second has the MS Test action.

What am I doing wrong?

And Furthermore which path do I have to use when i reference builded output files?

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [April 15, 2013, 8:24am UTC](https://www.finalbuilder.com/forums/t/referencing-ms-unittests/4943/2 "2013-04-15T08:24:45Z")

</div>

The files are stored under the workspace folder. You can use the variable $Workspace$ to refer to this folder e.g. &nbsp;$Workspace$\output\*\*.dll

You can set up workspace rules in the stage options to control which files are copied between stages. See h[ttp://wiki.finalbuilder.com/display...ge+Options](http://wiki.finalbuilder.com/display/continua/Stage+Options)&nbsp;for more information.&nbsp;

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [April 15, 2013, 9:32am UTC](https://www.finalbuilder.com/forums/t/referencing-ms-unittests/4943/3 "2013-04-15T09:32:08Z")

</div>

You should probably also set the OutputPath property on the MSBuild action.

---

<div class="post-metadata">

### Author: ![haggy](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/h/edb3f5/32.png) [@haggy](https://www.finalbuilder.com/forums/u/haggy)
#### Post date: [April 15, 2013, 11:36am UTC](https://www.finalbuilder.com/forums/t/referencing-ms-unittests/4943/4 "2013-04-15T11:36:12Z")

</div>

hmm I use the VisualStudio Build action there isn’t a property like that. And the output that is defined in the solutions isn’t filled.   
 It’s a relative path and i checked it in the path used by continua. the target folder is empty.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 15, 2013, 12:10pm UTC](https://www.finalbuilder.com/forums/t/referencing-ms-unittests/4943/5 "2013-04-15T12:10:43Z")

</div>

The way I resolved this is by adding a copy file action after the VS action in the configuration stages, which copies the files from the $Source.Repo$…VSproject\bin\debug|release folder to the \Output\ folder and then run your MS Build (of Nunit) tests against the files in that folder.   
  
 I generally also edit the Stage options -\> Artifacts and include things like   
  
 Output\*_.zip   
 Output\*_.msi   
 Output\Tests\*_.trx   
 nunit | Output\Tests\*_.xml   
  
 So I can retrieve important files from the build.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 15, 2013, 12:13pm UTC](https://www.finalbuilder.com/forums/t/referencing-ms-unittests/4943/6 "2013-04-15T12:13:18Z")

</div>

> Posted By [Jenasys Design Pty Ltd](https://www.finalbuilder.com/User-Profile/userid/11490.aspx) on 15 Apr 2013 05:10 AM  
> and then run your MS Build (of Nunit) tests against the files in that folder.&nbsp;&nbsp;

should read:

_and then run your MSTest (or Nunit) actions against the files in the \Output\Tests\*\* folder._

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [April 15, 2013, 12:31pm UTC](https://www.finalbuilder.com/forums/t/referencing-ms-unittests/4943/7 "2013-04-15T12:31:32Z")

</div>

You know you don’t _have_ to copy the files to the \output folder on the agent, just add a Workspace rule (stage options) that copies the files from where ever they end up (assuming you have relative paths in your project settings in [vs.net](http://vs.net)).

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [April 16, 2013, 1:30am UTC](https://www.finalbuilder.com/forums/t/referencing-ms-unittests/4943/8 "2013-04-16T01:30:03Z")

</div>

For example:

```
$Source$ > Source 
```

```

```

in Repository Rules (Stage Options) copies the repository files to the \Source folder on the agent workspace.

```
Output < \Source\Repo\VSproject\bin\release\*.dll
```

```

```

in the Workspace Rules for the Build stage to copy the resultant dlls from the agent workspace back to the Output folder on the server workspace.

```
Output\**.dll > Output
```

```

```

in the Workspace Rules for the Test stage to copy the dlls from the server&nbsp;workspace&nbsp;to the agent&nbsp;workspace.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 16, 2013, 2:56am UTC](https://www.finalbuilder.com/forums/t/referencing-ms-unittests/4943/9 "2013-04-16T02:56:44Z")

</div>

Cheers for the example Dave.
