Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

doing msbuild from the command line: getting errors for the referenced namespace 'Microsoft.VisualStudio.TestTools'

Tags:

msbuild

i'm compiling a .net 3.5 solution with msbuild with this line of code:

msbuild.exe n:\temp\Thisnight.sln /p:Configuration=Debug /v:diag

and it gives me this error:

 error CS0234: The type or namespace name 'UnitTesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)

i've gotten the latest source which (off course) builds in VS2010 itself.

Can't seem to figure out what i'm missing here....

EDIT

Seeing higher up in the command window this message:

  C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3245: Could not resolve this reference.
 Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutra
l, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

I don't think i have to include this DLL by my project (because it's a MS dll?)

EDIT What i've seen now: all projects are for the .Net 3.5 framework, but the testproject (which is the one giving me problems) is for the .Net 4.0 framework. And the weird thing is: i can't change it.

It's a vs2010 solution with web. webservice,winforms,dll,setup and testprojects

like image 457
Michel Avatar asked Oct 02 '10 21:10

Michel


1 Answers

did you run vcvars32.bat in your cmd shell?

like image 112
Marco Avatar answered Oct 01 '22 02:10

Marco