468,310 Members | 1,433 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,310 developers. It's quick & easy.

NANT and namespaces

Hello,

I want to build executable files (command line) with NANT.

For example I have a source file X.cs in the namespace
com.mycompany.examples. The class X inherits from a class Y which is
located in the package com.mycompany.examples.tech.
When I try to build a executable, I get the following error message:

build:

[csc] Compiling 1 files to 'c:\X.exe'.
[csc] d:\dotNet\src\X.cs(5,30): error CS0234: Der Typ- oder
Namespacename tech ist im Namespace com.mycompany.examples nicht
vorhanden. (Fehlt ein Assemblyverweis?)
BUILD FAILED

D:\dotNet\codesamples.build(63,4):
External Program Failed:
C:\WINNT\Microsoft.NET\Framework\v2.0.50727\csc.ex e (return code was 1)
Here is my NANT build file:

################################################## ##########################################
<?xml version="1.0" encoding="utf-8" ?>
<project name="MP Codesamples for .NET" default="build" basedir=".">

<property name="bin.debug.dir" value=".\bin\Debug" />
<property name="bin.release.dir" value=".\bin\Release" />
<property name="src.dir" value=".\src" />
<property name="lib.dir" value=".\lib" />
<property name="debug" value="true" overwrite="false" />

<target name="build" description="compiles the source code"
depends="clean">
<csc target="exe" output="c:\X.exe" debug="${debug}">
<references>
<include name="${lib.dir}\*.dll"/>
</references>
<sources>
<include name="${src.dir}\X.cs" />
</sources>
</csc>
</target>
</project>

Can anyone tell me how to include the namespace com.mycompany.examples.tech?

Sincerely,
Thomas
Jul 7 '06 #1
0 1051

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by hoochiegooch | last post: by
1 post views Thread by Nigel Currie | last post: by
2 posts views Thread by george r smith | last post: by
reply views Thread by muesliflakes | last post: by
2 posts views Thread by Ireneus Broncel | last post: by
4 posts views Thread by emferrari | last post: by
12 posts views Thread by michael sorens | last post: by
reply views Thread by james.mcdonagh | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.