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?
 
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
 
SriVaddadiCommented:
Not sure if vcbuild.exe exists or not you could use msbuild.exe
0
 
SaggiAuthor Commented:
Where is msbuild.exe located?
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
SaggiAuthor Commented:
vcbuild.exe did exist in the path mentioned above!
0
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.