Bugs item #969593, was opened at 2004-06-09 06:27
Message generated for change (Comment added) made by ddboyle945
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=969593&group_id=31650

Category: Tasks
Group: 0.85
Status: Open
Resolution: None
Priority: 5
Submitted By: Thibaut Barrère (tbarrere)
Assigned to: Nobody/Anonymous (nobody)
Summary: Solution task fails to guess outputpath

Initial Comment:
symptom : when building a solution (attached here with
the build file) using the solution task, I get the
following output :

--------OUTPUTBEGIN----------------
NAnt 0.85 (Build 0.85.1619.0; net-1.1.win32; nightly;
07/06/2004)
Copyright (C) 2001-2004 Gerry Shaw
NAnt Team

Buildfile:
file:///C:/workingpatches/PathCombine/default.build
Target(s) specified: build

build:

 [solution] Starting solution build.

BUILD FAILED

INTERNAL ERROR

System.ArgumentNullException: Value cannot be null.
Parameter name: path2
   at System.IO.Path.Combine(String path1, String path2)
   at NAnt.VSNet.VcConfiguration.get_OutputPath() in
c:\BuildServer\Tools\nant\src\NAnt.VSNet\VcConfiguration.cs:line
154 at NAnt.VSNet.ProjectBase.GetOutputPath(String
configuration) in
c:\BuildServer\Tools\nant\src\NAnt.VSNet\ProjectBase
.cs:line 178
at NAnt.VSNet.Solution.GetDependenciesFromProjects() in
c:\BuildServer\Tools\nant\src\NAnt.VSNet\Solution.cs:line
594
at NAnt.VSNet.Solution..ctor(FileInfo solutionFile,
ArrayList additionalProjects, ArrayList
referenceProjects, TempFi
leCollection tfc, SolutionTask solutionTask,
WebMapCollection webMaps, FileSet excludesProjects,
DirectoryInfo outputDir
, GacCache gacCache) in
c:\BuildServer\Tools\nant\src\NAnt.VSNet\Solution.cs:line
131 at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask() in
c:\BuildServer\Tools\nant\src\NAnt.VSNet\Tasks\SolutionTask.cs:line
 365 at NAnt.Core.Task.Execute() in
c:\BuildServer\Tools\nant\src\NAnt.Core\Task.cs:line 176
   at NAnt.Core.Target.Execute() in
c:\BuildServer\Tools\nant\src\NAnt.Core\Target.cs:line 249
   at NAnt.Core.Project.Execute(String targetName,
Boolean forceDependencies) in
c:\BuildServer\Tools\nant\src\NAnt.Core
\Project.cs:line 870
   at NAnt.Core.Project.Execute() in
c:\BuildServer\Tools\nant\src\NAnt.Core\Project.cs:line 827
   at NAnt.Core.Project.Run() in
c:\BuildServer\Tools\nant\src\NAnt.Core\Project.cs:line 895

Please send bug report to
[EMAIL PROTECTED]

Total time: 0.2 seconds.

--------OUTPUTEND----------------



investigation : i discovered this in the vcproj file
(which I did not manually edit myself)

------------ .vcproj extract ----------
<Configuration
        Name="Debug|Win32"
(....)
        />
(...)
        <Tool Name="VCLibrarianTool"/>
(...)
<Configuration
        Name="Release|Win32"
(....)
        />
<Tool
        Name="VCLibrarianTool"
        OutputFile="$(OutDir)/$(ProjectName).lib"/>
-------------- end of extract -------------

vs.net doesn't always set the OutputFile attribute on
VCLibrarianTool, and seems to default internally to the
other configuration in this case. The project compiles
fine under VS.Net 2003.


consequence : the solution task fails to guess the
outputpath through current configuration VCLibrarianTool.

suggestion : defaults to another configuration
vclibrarian tool (such as release, but what to do when
there are more configurations, or no more "release"
configuration ?)


Thibaut Barrère


----------------------------------------------------------------------

Comment By: Darwin Dan Boyle (ddboyle945)
Date: 2004-07-14 13:10

Message:
Logged In: YES 
user_id=742907

I have also had this problem, I have a temporary workaround, 
and have looked at the Nant source code.

I'm using NAnt 0.84 release.  I tried the 7/14/2004 test build, 
and it didn't resolve this problem.

To recreate the problem.  Go into the MS Visual Studio .NET 
2003 IDE, select File...New Project... and create an ATL .dll 
project (unmanaged).  In our case, lets create a project 
called Binky.  Hit enter through the rest of the defaults to 
have the project created on your hard drive.  

Notice that there are TWO .vcproj files created, one for 
the .dll (Binky.vcproj), and another for the proxy/stub of this 
DLL (BinkyPS.vcproj).  The proxy/stub .vcproj is the one that 
fails in Nant with this error.

As a work around, you can edit the .sln file with a text editor, 
and delete the lines containing the Project...EndProject for 
BinkyPS (and everything in between).  The other project will 
work.  This workaround works for me because I don't care 
about a COM proxy/stub (and I suspect most people don't 
care about the proxy/stub)...

After looking at the source for 
src\Nant.VSNet\vcconfiguration.cs, around line 113 (I'm using 
0.84 release), the code is trying to get a OutputFile from 
somewhere.  First it tries to find one associated with the 
Linker (VCLinkerTool), then it tries to find one associated with 
the Librarian (VCLibrarianTool).  The Proxy project doesn't 
have an OutputFile anywhere, hence the null string returned.

If you think about it, in most cases a project has a output file 
target of some sort, either a .dll or a .exe (which are created 
by the linker), or a library (which is created by the librarian), 
so this code kinda makes sense.  Problem is, the PS project 
doesn't have ANY output shown in this .vcproj file.

----------------------------------------------------------------------

Comment By: Thibaut Barrère (tbarrere)
Date: 2004-06-09 06:33

Message:
Logged In: YES 
user_id=1060049

Update : NAnt version I used was recompiled; here's the
output when using nightly Build 0.85.1606.0

---------------------------------
NAnt 0.85 (Build 0.85.1606.0; net-1.0.win32; nightly;
25/05/2004)
Copyright (C) 2001-2004 Gerry Shaw
NAnt Team

Buildfile: file:///C:/workingpatches/PathCombine/default.build
Target(s) specified: build

build:

 [solution] Starting solution build.

BUILD FAILED

INTERNAL ERROR

System.ArgumentNullException: Value cannot be null.
Parameter name: path2
   at System.IO.Path.Combine(String path1, String path2)
   at NAnt.VSNet.VcConfiguration.get_OutputPath() in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp1B13.tmp\src\NAnt.VSNet\VcCon
figuration.cs:line 154
   at NAnt.VSNet.ProjectBase.GetOutputPath(String
configuration) in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp1B13.tmp\src\N
Ant.VSNet\ProjectBase.cs:line 178
   at NAnt.VSNet.Solution.GetDependenciesFromProjects() in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp1B13.tmp\src\NAnt.VSNet
\Solution.cs:line 594
   at NAnt.VSNet.Solution..ctor(FileInfo solutionFile,
ArrayList additionalProjects, ArrayList referenceProjects,
TempFi
leCollection tfc, SolutionTask solutionTask,
WebMapCollection webMaps, FileSet excludesProjects,
DirectoryInfo outputDir
, GacCache gacCache) in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp1B13.tmp\src\NAnt.VSNet\Solution.cs:line
131
   at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask() in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp1B13.tmp\src\NAnt.VSNet\Tasks
\SolutionTask.cs:line 365
   at NAnt.Core.Task.Execute() in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp1B13.tmp\src\NAnt.Core\Task.cs:line
176
   at NAnt.Core.Target.Execute() in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp1B13.tmp\src\NAnt.Core\Target.cs:line
249
   at NAnt.Core.Project.Execute(String targetName, Boolean
forceDependencies) in C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp1
B13.tmp\src\NAnt.Core\Project.cs:line 870
   at NAnt.Core.Project.Execute() in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp1B13.tmp\src\NAnt.Core\Project.cs:line
827
   at NAnt.Core.Project.Run() in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp1B13.tmp\src\NAnt.Core\Project.cs:line
895

Please send bug report to [EMAIL PROTECTED]

Total time: 0.3 seconds.
---------------------------------

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=969593&group_id=31650


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to