title: I can build this project in VS but not with msbuild
body: <p>I'm trying to build a ms test project in a nuget app.</p>
  <p>My project structure is this:</p>
  <pre><code>MyPackage
  --&gt; MyPackage
  --&gt; MyPackageTest
  </code></pre>
  <p>If I open VS and right click and build MyPackageTest it works. If I go to cmd and type this I fails:</p>
  <pre><code>msbuild .\MyPackageTest\MyPackageTest.csproj /T:build &quot;/p:Configuration=Release&quot;
  </code></pre>
  <p>I get errors like this:</p>
  <pre><code>&quot;C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj&quot; (build target) (1) -&gt;
  (CoreCompile target) -&gt;
    MyTests.cs(2,17): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(2,17): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(13,4): error CS0246: The type or namespace name 'TestClassAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(13,4): error CS0246: The type or namespace name 'TestClass' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyTests.cs(13,4): error CS0246: The type or namespace name 'TestClassAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyTests.cs(13,4): error CS0246: The type or namespace name 'TestClass' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(17,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(17,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(38,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(38,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(59,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(59,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(75,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(75,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(91,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyOtherTests.cs(91,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyTests.cs(16,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyTests.cs(16,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyTests.cs(36,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyTests.cs(36,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyTests.cs(50,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyTests.cs(50,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyTests.cs(65,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyTests.cs(65,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyTests.cs(81,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
    MyTests.cs(81,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj]
  </code></pre>
  <p>EDIT: to add, msbuild also throws this error:  <code>Could not locate the assembly &quot;Microsoft.VisualStudio.QualityTools.UnitTestFramework&quot;</code></p>