Thank you Adrian. It worked fine.

Do you know if there's a way to save the msbuild task result into a property?

Is it possible to redirect the msbuild task output into a file?

Regards,

Stephane

-----Original Message-----
From: Adrian Lazea [mailto:[EMAIL PROTECTED] 
Sent: 7 février 2007 09:53
To: Stephane Hamel
Cc: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Project '' is not a valid Visual C++ project.

Hi Stephan,

Unfortunately, the <solution> task in NAnt does not support Visual 
Studio 2005 solutions; this task supports VS .NET 2002 and 2003 
solutions only. You can use the <msbuild> task in NAntContrib instead, 
to build your VS 2005 solutions and projects.

Please find a sample of using this task below:

<project name="TestProject" default="build">
    <loadtasks
        assembly="NAnt.Contrib.Tasks.dll"
    />

    <property
        name="project.folder"
        value="D:\MyProject"
    />
    <property
        name="project.file"
        value="test.sln"
    />

   <target name="build">
       <msbuild project="${project.folder}\${project.file}">
           <arg value="/t:Rebuild"/>
           <arg value="/p:Configuration=Debug"/>
           <arg value="/p:Platform=&quot;Any CPU&quot;"/>
       </msbuild>
   </target>

</project>


Best regards,
/Adrian.

--
Adrian Lazea

Team Lead
Windows Development and
Quality Assurance Departments

Schlund + Partner AG
18 Mircea Eliade St.
012015, Bucharest, Romania


Stephane Hamel wrote:
> Hello NAnt User,
> 
>  
> 
> I just downloaded the nightly build (2007-02-04) and tried to compile a 
> Visual Studio 2005 solution using the solution task. I always get the 
> following error message when I execute my build file:
> 
>  
> 
> NAnt 0.86 (Build 0.86.2591.0; nightly; 2007-02-04)
> 
> Copyright (C) 2001-2007 Gerry Shaw
> 
> http://nant.sourceforge.net
> 
>  
> 
> Buildfile: 
> file:///D:/Eng-SH/LoggingService/svbb/svci_tools/CreateSolution/CreateSolution.build
> 
> Target framework: Microsoft .NET Framework 2.0
> 
> Target(s) specified: build
> 
>  
> 
>  
> 
> build:
> 
>  
> 
>  [solution] Starting solution build.
> 
>  [solution] Loading projects...
> 
>  [solution] Loading project 
> 'D:\Eng-SH\LoggingService\svbb\svci_tools\CreateSolution\CreateSolution\CreateSolution.vcproj'.
> 
>  
> 
> BUILD FAILED
> 
>  
> 
> Project '' is not a valid Visual C++ project.
> 
>  
> 
> Total time: 0.8 seconds.
> 
>  
> 
>  
> 
> My build file :
> 
> <solution solutionfile="createsolution.sln" configuration="debug" 
> verbose="true">
> 
>             <projects>
> 
>                         <include name="CreateSolution.vcproj"/>
> 
>             </projects>
> 
> </solution>
> 
>  
> 
> Stephane H.
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to