Sanjoy wrote:

Dear Ian Mac,
Thanks for your advice.
I will do it and let you know.
However I want to say that my project is made up of many csproj files and many of them are library types.
They contains many FrmXYZ.CS files, resource files.
I want to know when I do <solution> task for the ultimate exe file will all related library files(DLL that are csproj files before compilations) will automatically get compiled?


Thats the theory yes. If you have all those csproj projects contained in a single solution then it may be enough to use somthing like:

<solution configuration="release" solutionfile="test.sln" />

and every .csproj will get built in the correct dependency order.

however you can have finer grained control by specifiying projects individually 
:

<solution configuration="release">
<projects>
<include name="A\A.csproj" />
<include name="B\b.vbproj" />
<include name="C\c.csproj" />
</projects> </solution>


you can review other examples at:

http://nant.sourceforge.net/nightly/latest/help/tasks/solution.html

Ian



Ian MacLean wrote:

Sanjoy wrote:

Dear All,
I am new to NANT. I want to know the compilation script for C#.Net code.


I have following nant script code for compilation.

<target name="CmpSrc" description="Compile all Downloaded Files">
<csc target="library" output="${Build.OutputFolder}latest\BuildingBL.dll" debug="true">
<sources>
<includes name="${Build.DownloadFolder}\Projects\BuildingBL\BuildingBL.csproj" />
</sources>
</csc>
</target>


However I get following errors on compilation.
Buildfile: file:///C:/BldSolu/testbuild.build.xml
Target(s) specified: build
build:
CmpSrc:
[echo] "Compillling files..."
[csc] Compiling 1 files to 'c:\builds\buildingsolution\latest\BuildingBL.dll'.
c:\DwnLd\PROJECTS\BuildingBL\BuildingBL.csproj(39,34): error CS1010: Newline in constant
c:\DwnLd\PROJECTS\BuildingBL\BuildingBL.csproj(59,34): error CS1010: Newline in constant
c:\DwnLd\PROJECTS\BuildingBL\BuildingBL.csproj(1,1): error CS0116: A namespace does not directly contain members such as fields or methods
BUILD FAILED
C:\BldSolu\testbuild.build.xml(16,2):
External Program Failed: C:\WINNT\Microsoft.NET\Framework\v1.1.4322\csc.exe (return code was 1)
Total time: 0.3 seconds.



Sanjoy,
the <csc> task is used for compiling .cs source files directly - it knows nothing about visual studio project files.


However the <solution> task is probably what you are looking for. Take a look at:
http://nant.sourceforge.net/nightly/latest/help/tasks/solution.html


Ian






-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to