jasondole
asked on
How do i Call MSBuild.exe with nant to build a solution file for visual studio 2005
I am using nant to do our automated builds and having a problem getting it to work with MSbuild and visual studio 2005 solutions. I am getting an error that says the return code was 1 when i tried this command below in my nant build file
<exec program="c:\windows\micros oft.net\fr amework\v2 .0.50727\M SBuild.exe " commandline="/t:rebuild ${root}Web\mysite.solution .sln" />
does anybody have any ideas?
<exec program="c:\windows\micros
does anybody have any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try to use the full path of ur solution file intead of root parameter
ASKER
My program is still crapping out when i try to build, it says
MSBUILD: error MSB1009: Project file does not exist
switch: D:\devbuilds\Web\mysite.so lution.sln
external program failed: c:\windows\microsoft.net\f ramework\v 2.0.50727\ MSBuild.ex e (return code was 1)
Here is the command line i had based off the article you gave me:
<exec program="c:\windows\micros oft.net\fr amework\v2 .0.50727\M SBuild.exe " verbose="true" failonerror="false" commandline="/t:rebuild d:\devbuilds\Web\mysite.so lution.sln " />
Any ideas why this is?
Thanks again for all your help!
MSBUILD: error MSB1009: Project file does not exist
switch: D:\devbuilds\Web\mysite.so
external program failed: c:\windows\microsoft.net\f
Here is the command line i had based off the article you gave me:
<exec program="c:\windows\micros
Any ideas why this is?
Thanks again for all your help!
ASKER
Ok, i used aspnet_compiler.exe and it seems to work with as a compiler but now i am getting errors dealing with missing assemblies, would using aspnet_compiler.exe cause these issues?
here is my call to the aspnet_compiler.exe call i have in nant.
<exec program="c:\windows\micros oft.net\fr amework\v2 .0.50727\a spnet_comp iler.exe" commandline="-v /HBR -p d:\devbuilds\mysite\webapp -c errorstack" verbose="true" failonerror="false" workingdir="d:\devbuilds\m ysite\"
my working directory is different becuase that is the directory where my refenernces are as the target directory is the main project, please let me know if you have any suggestions or comments, thanks for your help!
here is my call to the aspnet_compiler.exe call i have in nant.
<exec program="c:\windows\micros
my working directory is different becuase that is the directory where my refenernces are as the target directory is the main project, please let me know if you have any suggestions or comments, thanks for your help!
the compiler needs the project to have all assemblies.
check your classes for imports or using statements
check your classes for imports or using statements
ASKER
all my classes have the correct assemblies, i migrated the solution file from vs2003 to vs2005 and it worked fine when i used to compile it in vs2003 but once i switched over to vs2005, i got this error so i think i am missing something in my compile statement but i am unsure, that is just a thought...