title: C# using static variable as parameter to DeploymentItem
body: <p>I want to use a static variable as the parameter to <code>DeploymentItem</code> on an MSTest unit test but it doesn't seem I'm able to do so.  There's an XSL file that needs to be copied along with the DLL file when the unit test runs, and I defined the location as</p>
  
  <pre><code>private static string _xslPath = Path.Combine("MyProjectDir", "transform.xsl");
  </code></pre>
  
  <p>However, when I then do the following:</p>
  
  <pre><code>[TestMethod]
  [DeploymentItem(DLL)]
  [DeploymentItem(_xslPath)]
  public void XmlToResultsTest() { }
  </code></pre>
  
  <p>I get this build error:</p>
  
  <blockquote>
    <p>An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type</p>
  </blockquote>
  
  <p>Okay okay, fine, but it just seems so dirty to assemble the path myself:</p>
  
  <pre><code>[DeploymentItem(@"MyProjectDir\transform.xsl")]
  </code></pre>
  
  <p>Am I being overly picky here about wanting to use <code>Path.Combine</code>?  Is there another alternative I'm missing?  I suppose I could just put the XSL file in the root solution directory so I don't have to pass in the project directory as part of the path.</p>