0
votes

I'm running a msbuild batch command in order to build my solution and i'm getting: error CS0246: The type or namespace name '******' could not be found (are you missing a using directive or an assembly reference?)

This is the batch command: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe %~dp0****.sln /t:clean /t:reBuild /v:d /m:4 /p:Configuration=Debug /p:Platform="x86"

But when i'm running a build for the same solution from within the visual studio everything works fine. I checked project dependencies and everything looks fine, the same problem happens when i'm running TFS build with the build definition I had built for this solution.

I'm building with Visual Studio 2013.

Any idea?

1
Add /l:FileLogger,Microsoft.Build.Engine;logfile=MyLog.loggranadaCoder
And then look at the log. One of your dependencies is probably "off" by a relative path or something.granadaCoder
I would check that the project references other projects as projects, not as the dlls in project output folders. That way the build order would matter. And its most certainly different from what you have in VS with the clean target specified and the multiprocessing switch.George Polevoy
Already checked the project references that they are projects and not dll's.mfuxi
Found this line in the log: Target "ResolveProjectReferences" in file "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets" from project "c:*****************************.csproj": Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and it continues further more, how can I solve it?mfuxi

1 Answers

0
votes

Apparently by removing the parameter /p:Platform="x86" the problem was solved, I have no idea why it crashed the build, might be because the solution configuration was already on x86.. could be a bug in MSBuild?