Ragesh,

Try adding a reference to the System.Linq.dll (in bold). Cheers,

Matt


<?xml version="1.0"?>
<project name="Hello World" default="build" basedir=".">
        <target name="build">
                <csc target="exe" output="HelloWorld.exe">
                        <sources>
                                <include name="D:\System 
Admin\Nant_example\Helloworld\Program.cs"/>
                        </sources>
                       <references>
                                <include name="System.Linq.dll" />
                        </references>
                </csc>
        </target>
</project>




Ragesh wrote:
> 
> Hi everbody,
>                   I am a new user to Nant I am using Nant0.86 I configured
> the path using Environment variable and while i am trying to execute the
> following build i end up with this error
> 
> Buildfile: file:///D:/System Admin/Nant_example/singleexecutable.build
> Target framework: Microsoft .NET Framework 2.0
> Target(s) specified: build 
> 
> 
> build:
> 
>       [csc] Compiling 1 files to 'D:\System
> Admin\Nant_example\HelloWorld.exe'.
>       [csc] d:\System Admin\Nant_example\Helloworld\Program.cs(3,14):
> error CS0234: The type or namespace name 'Linq' does not exist in the
> namespace 'System' (are you missing an assembly reference?)
> 
> BUILD FAILED
> 
> D:\System Admin\Nant_example\singleexecutable.build(4,4):
> External Program Failed:
> C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe (return code was 1)
> 
> 
> 
> <?xml version="1.0"?>
> <project name="Hello World" default="build" basedir=".">
>       <target name="build">
>               <csc target="exe" output="HelloWorld.exe">
>                       <sources>
>                               <include name="D:\System 
> Admin\Nant_example\Helloworld\Program.cs"/>
>                       </sources>
>               </csc>
>       </target>
> </project>
> 
> I am using windows server 2008 enterprise edition.
> 
> 

-- 
View this message in context: 
http://old.nabble.com/External-Program-Failed%3A-C%3A%5CWindows%5CMicrosoft.NET%5CFramework%5Cv2.0.50727%5Ccsc.exe-%28return-code-was-1%29-tp27714365p27819983.html
Sent from the NAnt - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to