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