Error when trying to build the solution through command from a script file

I have a soultion which has 5 projects, 1 project is failing error:
"  .vdproj error MSB4025: The project file couldnot be loaded,. Data at the root level is invalid"
If I build from vs2005 editor it works fine.

Below is script that rebuilds the solution :
  <property name="devStudio" value="D:\Program Files\Microsoft Visual Studio 8  \VC\vcpackages\vcbuild.exe" />
  <property name="buildConfiguration" value=""Release|Any CPU"" />
  <property name="projectFile" value="${basedirectory}\IWRS.sln" />
  <property name="rebuild" value="/REBUILD" />

  <exec executable="${devStudio}" dir="${basedirectory}" failonerror="true">
  <arg line="${projectFile} /MAKE ${buildConfiguration} ${rebuild}" />
  </exec>
SaggiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SriVaddadiCommented:
Not sure if vcbuild.exe exists or not you could use msbuild.exe
0
SaggiAuthor Commented:
Where is msbuild.exe located?
0
SaggiAuthor Commented:
vcbuild.exe did exist in the path mentioned above!
0
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

SaggiAuthor Commented:
If I use msbuild.exe none of the projects are building
It says :
[exec] MSBUILD : error MSB1001: Unknown switch.
[exec] Switch: /MAKE
BUILD FAILED
0
pkadianCommented:
You have to use devenv.exe for visual studio 2008.
0
pkadianCommented:
All command line builds are also by devenv.exe only.
0
SriVaddadiCommented:
0
SriVaddadiCommented:
pkadian, to answer your question, devenv is VisualStudio(VS) and VS might not be available on the build machine and so is not a safe bet. It is clearly development(Dev) environment(Env). Hope I make sense
0
pkadianCommented:
You may be right , However my understanding is that Saggi is trying cmd line build on development machine only.Then there is no sense to try something which we are not sure as developer.
Devenv.exe is safe bid to have cmd line build in such cases.
Even on build machines , Enterprises are using devenv also.
0
SaggiAuthor Commented:
devenv.exe also erorr its not building not even showing the where it failed, just says build failed.
Below is script:
- <target name="-msdev">
  <property name="devStudio" value="C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" />
  <property name="buildConfiguration" value=""Release|Any CPU"" />
  <property name="projectFile" value="${basedirectory}\trunk\IWRS.sln" />
  <property name="rebuild" value="/REBUILD" />
  <echo message="running: ${devStudio} ${projectFile} /MAKE ${buildConfiguration} ${rebuild}" />
  <echo message="basedir: ${basedirectory}" />
- <exec executable="${devStudio}" dir="${basedirectory}" failonerror="true">
  <arg line="${projectFile} /${buildConfiguration} ${rebuild}" />
0
SaggiAuthor Commented:
If I use vcbuild.exe only one project is failing it is webservice installer.vdproj "error MSB4025: The project file cannot be loaded Data at root level is invalid"
How to fix this?
If I build it from vs2005 it works fine.
If I use devenv.exe it just says build failed no info where its failing!!!
0
SaggiAuthor Commented:
Error102The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?)
Error104The type or namespace name 'Test' could not be found (are you missing a using directive or an assembly reference?)
Error105The type or namespace name 'TestFixture' could not be found (are you missing a using directive or an assembly reference?)

What does the above error mean, I have C#.Net web service application when I build the soultion I get the above like errors.
0
pkadianCommented:
NUnit or Test Or TestFixture all seems to be your classes .Either you need to include y 'using' if all files are in independent .cs files or if all these are in some common .cs file , For example if you have X.cs file where all of this classes may be declared then you need to do the following.
Now make sure either the X.cs should be in same directory of your code root or may be include by 'using'.

If NUnit is in X.cs then may be you can use it X.NUnit.
0
pkadianCommented:
Got it , You need to add following in code.

using Nunit.Framework
0
SaggiAuthor Commented:
Found the answer. I did already have the NUnit dll. The problem is we need to change the property  specficversion of reference to Fasle!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.