Title: RE: [nant-dev] Problems with basedir beginning with ../

Ian,

I'm sorry... The problem was that the ${build.dir} property
in a subproject was set to ${nant.project.basedir}/build, and the
resulting path was

../Core/home/genius/projects/gekkota/src/Gekkota/test/build/gekkota-debug/bin

instead of

../Core/build/gekkota-debug/bin

I usually set ${build.dir} to '${nant.project.basedir}/build' in the
build file located in the project's top directory, so that subprojects
put the results in the distribution directory when running nant from
there... but I set ${build.dir} to 'build' in the build files located in
each subproject, just to be able to work locally without having to go
back to the project's top directoy after each build.

So, in this case, I accidentally set ${build.dir} to
'${nant.project.basedir}/build' in a subproject.

I'm really sorry!!!!!!

Thanks,

Gius_.

> -----Original Message-----
> From: Ian MacLean [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 11, 2003 6:28 AM
> To: Greco Giuseppe
> Cc: Giuseppe Greco; NAnt Developers
> Subject: Re: [nant-dev] Problems with basedir beginning with ../
>
>
> does it work if you specify the full path to
> "../Core/${build.dir}/${package.name}/bin" ?
>
> what does ../Core/${build.dir}/${package.name}/bin look like when the
> prpoerties are expanded ? - use echo to pipe it to sdtout
>
> I created a sample very similar to yours and the ../ notation
> is working
> fine.
>
> Also if you could run it thru the debugger and find the exact string
> passed to System.IO.Path.GetFullPath(String path) that would
> be helpful.
>
> Ian
> > Ian,
> >
> > this is my target:
> >
> > <target name="build" depends="init">
> >   <csc target="exe" debug="${build.debug}"
> >     output="${build.dir}/${package.name}/bin/multicaster.test.exe">
> >     <sources basedir="test" failonempty="true">
> >       <includes name="MulticasterTest.cs" />
> >     </sources>
> >     <references basedir="../Core/${build.dir}/${package.name}/bin">
> >       <includes name="*.dll"/>
> >     </references>
> >   </csc>
> > </target>
> >
> > ... and these are the error messages produced by NAnt:
> >
> > INTERNAL ERROR
> >
> > System.NotSupportedException: The given path's format is
> not supported.
> >    at
> System.Security.Util.StringExpressionSet.CanonicalizePath(String
> > path, Boolean needFullPath)
> >    at
> System.Security.Util.StringExpressionSet.AddExpressions(String[]
> > str, Boolean checkForDuplicates, Boolean needFullPath)
> >
> >    at
> >
> System.Security.Permissions.FileIOPermission.AddPathList(FileI
> OPermissionAccess
> > access, String[] pathListOrig, Boolean checkForDuplicates, Boolean
> > needFullPath, Boolean copyPathList)
> >
> >    at
> >
> System.Security.Permissions.FileIOPermission..ctor(FileIOPermi
> ssionAccess
> > access, String[] pathList, Boolean checkForDuplicates,
> Boolean needFullPath)
> >
> >    at System.IO.Path.GetFullPath(String path)
> >    at NAnt.Core.Project.GetFullPath(String path)
> >    at NAnt.Core.Types.FileSet.InitializeElement(XmlNode elementNode)
> >    at NAnt.Core.Element.Initialize(XmlNode elementNode)
> >    at
> NAnt.Core.Element.CreateChildBuildElement(PropertyInfo propInf,
> > XmlNode xml)
> >    at NAnt.Core.Element.InitializeXml(XmlNode elementNode)
> >    at NAnt.Core.Element.Initialize(XmlNode elementNode)
> >    at NAnt.Core.Target.Execute()
> >    at NAnt.Core.Project.Execute(String targetName)
> >    at NAnt.Core.Project.Execute()
> >    at NAnt.Core.Project.Run()
> >
> >
> > As you can see, NAnt doesn't accept the basedir specified
> > for the <refereces> element. I've this problem on both Windows
> > and Linux.
> >
> > Gius_.
> >
> >  > -----Original Message-----
> >  > From: Ian MacLean [mailto:[EMAIL PROTECTED]]
> >  > Sent: Sunday, June 08, 2003 1:35 PM
> >  > To: Giuseppe Greco
> >  > Cc: NAnt Developers
> >  > Subject: Re: [nant-dev] Problems with basedir beginning with ../
> >  >
> >  >
> >  > well I can't repooduce this behaviour with either the
> csc task or the
> >  > copy task on windows. I haven't tried linux yet. Can you
> >  > please include
> >  > the NAnt output when you run this buildfile ?
> >  >
> >  > Ian
> >  >
> >  > > Hi all,
> >  > >
> >  > > I've a task like this:
> >  > >
> >  > > <csc target="exe" debug="${build.debug}"
> >  > >   output="${build.dir}/${package.name}/bin/multicaster.exe">
> >  > >   <sources>
> >  > >     <includes name="Multicaster.cs" />
> >  > >   </sources>
> >  > >   <references
> basedir="../Core/${build.dir}/${package.name}/bin">
> >  > >     <includes name="gekkota.core.dll"/>
> >  > >     <includes name="gekkota.ssl.dll"/>
> >  > >   </references>
> >  > >  </csc>
> >  > >
> >  > > As you can see, the basedir property of the <references> task
> >  > > begins with ../ - to build this application I need some dlls
> >  > > located on a different subproject:
> >  > >
> >  > > src
> >  > >  +-Gekkota
> >  > >       +-Core
> >  > >       |   ...
> >  > >       +-Test
> >  > >           ...
> >  > >
> >  > > The problem is that NAnt doesn't accept paths beginning with
> >  > > ../ (I've noticed the same problem with the <copy> and <move>
> >  > > tasks).
> >  > >
> >  > > As I run the task above, NAnt complies saying that this path
> >  > > format is not supported.
> >  > >
> >  > > The problem is on both Windows and Linux.
> >  > >
> >  > > Gius_.
> >  > >
> >  >
> >  >
> >  >
> >  >
> >  > -------------------------------------------------------
> >  > This SF.net email is sponsored by:  Etnus, makers of
> >  > TotalView, The best
> >  > thread debugger on the planet. Designed with thread
> debugging features
> >  > you've never dreamed of, try TotalView 6 free at www.etnus.com.
> >  > _______________________________________________
> >  > Nant-developers mailing list
> >  > [EMAIL PROTECTED]
> >  > https://lists.sourceforge.net/lists/listinfo/nant-developers
> >  >
> >
>
>

Reply via email to