# NUnit CategoryMask not converting variables to string

**URL:** https://www.finalbuilder.com/forums/t/nunit-categorymask-not-converting-variables-to-string/3568
**Category:** Bugs
**Created:** [August 3, 2015, 3:15am UTC](https://www.finalbuilder.com/forums/t/nunit-categorymask-not-converting-variables-to-string/3568 "2015-08-03T03:15:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lyho86](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/l/e19b73/32.png) [@lyho86](https://www.finalbuilder.com/forums/u/lyho86)
#### Post date: [August 3, 2015, 3:15am UTC](https://www.finalbuilder.com/forums/t/nunit-categorymask-not-converting-variables-to-string/3568/1 "2015-08-03T03:15:00Z")

</div>

Hi,  
  
The NUnit -\> CategoryMask property is not converting the specified variable to string. &nbsp;Instead it puts in the variable name literally in the NUnit parameter line. &nbsp;  
Thus it does not exclude categories (CategoryMaskType set to 'Exclude').  
  
e.g.  
%NUNIT\_EXCLUDE% = "PinkTests"  
[Then when running FB, in the console it looks like]&nbsp;Parameters: "\\MyApp.UnitTest.dll" /framework:net-4.0 /xml="C:\Develop\MyApp\_UnitTestOutput.xml" /Exclude:"%NUNIT\_EXCLUDE%"

  
FB: 7.0.0.3319  
Windows 7 Ent. Service Pack1  
NUnit 2.6.4  
  
  
Regards,  
Ly

---

<div class="post-metadata">

### Author: ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)
#### Post date: [August 5, 2015, 12:43pm UTC](https://www.finalbuilder.com/forums/t/nunit-categorymask-not-converting-variables-to-string/3568/2 "2015-08-05T12:43:22Z")

</div>

Hi Ly,   
  
 Thank you for reporting this. The fix looks simple enough and will get a release out today for it.

---

<div class="post-metadata">

### Author: ![lyho86](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/l/e19b73/32.png) [@lyho86](https://www.finalbuilder.com/forums/u/lyho86)
#### Post date: [August 5, 2015, 2:32am UTC](https://www.finalbuilder.com/forums/t/nunit-categorymask-not-converting-variables-to-string/3568/3 "2015-08-05T02:32:26Z")

</div>

Hi Jason,  
  
Thanks for the quick response.  
  
  
Ly

---

<div class="post-metadata">

### Author: ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)
#### Post date: [August 5, 2015, 6:14am UTC](https://www.finalbuilder.com/forums/t/nunit-categorymask-not-converting-variables-to-string/3568/4 "2015-08-05T06:14:50Z")

</div>

Hi Ly,   
  
 The fix for this is in the latest official release.
