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>
<references>
<include name="C:\DevTools\nunit\bin\bin\nunit.framework.dll"/>
</references>
</csc>
<csc target="library" output="${Build.OutputFolder}latest\BuildingTest.DLL" debug="true">
<sources>
<includes name="${Build.DownloadFolder}\Projects\BuildingTest\BuildingTest.csproj"/>
</sources>
<references>
<include name="C:\DevTools\nunit\bin\bin\nunit.framework.dll"/>
<includes name="${Build.OutputFolder}latest\BuildingBL.dll" />
</references>
</csc>
<csc target="exe" output="${Build.OutputFolder}latest\BuildingUI.exe" debug="true">
<sources>
<includes name="${Build.DownloadFolder}\Projects\BuildingUI\BuildingUI.csproj"/>
</sources>
<references>
<includes name="${Build.OutputFolder}latest\BuildingTest.DLL"/>
<includes name="${Build.OutputFolder}latest\BuildingBL.dll" />
<include name="C:\DevTools\nunit\bin\bin\nunit.framework.dll"/>
</references>
</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.
However if I compile the code using C# IDE it is compiling.
Please suggest what to change in my script.
Thanks Sanjoy
-------------------------------------------------------
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