Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

MSTest [DeploymentItem] and Environment Variables

AddThis Social Bookmark Button
Today I’ve been fixing up the build system for Microsoft.Activities and Microsoft.Activities.UnitTesting.  Over time I’ve been using a combination of strange tools and batch files to build things but it became such a mess I decided to take the time to finally build a good project file that I can use MSBuild on that will do everything Build sources Build Help files Build NuGet Packages The first problem I ran into was that my unit tests use the [DeploymentItem] attribute to deploy files when testing
with MSTest.  The problem is that the test considers the $(SolutionDir) the root folder for the test.  Previously I had just the Solutions for Microsoft.Activities and Microsoft.Activities.UnitTesting but now I made a single solution file in a different location with everything.  This cause my tests to be broken because the deployment paths were wrong. After much searching I finally decided the best thing to do was to use an environment variable.  Since I call these projects “Labs" projects (for historical reasons) I decided to use a variable called “LABDIR”.
Home : Blog List : Ron Jacobs : MSTest [DeploymentItem] and Environment Variables