Share

NAnt - A .NET Build Tool

Tracker: Bugs

5 "solution" task and project reference parsing - ID: 1076015
Last Update: Comment added ( drieseng )

I have a project, with file name like
"Lib_General.csproj". Inside the project file, the
assmbly name is overridden with AssemblyName =
"MyCompany.Lib_General"

Another project, named "Lib_Specific", has reference to
this project. But not as project reference, but as
usual reference to assembly
<Reference
Name = "MyCompany.Lib_General"
AssemblyName = "MyCompany.Lib_General"
HintPath = ".."
/>

When I try to build a solution (using <solution> task)
which includes lib_General project and Lib_Specific
project, whene compiling the lib_specific, nant
complains about not beeing able to find referenced
assembly "MyCompany.Lib_General" (and the build order
is wrong).


Gert Kello ( gkello ) - 2004-11-30 14:12

5

Closed

Fixed

Gert Driesen

Tasks

0.85

Public


Comments ( 5 )

Date: 2004-12-30 18:33
Sender: driesengProject AdminAccepting Donations

Logged In: YES
user_id=707851

I've modified the <solution> task to allow matching between
assembly reference and project using assembly name if the
assembly file does not exist.

This should fix your problem (I verified it ofcourse).


Date: 2004-12-30 16:56
Sender: gkello

Logged In: YES
user_id=103371

Well, if the assembly is built as a part of current
solutions... I would expect that the file names are matched...

But I would expect that matching to work at least when the
\bin\...
directory is replaced with
\obj\.. one (in hintpath).

I.e., if You modify the csproj file to conatin
..\Lib_General\obj\...
isntead of
..\Lib_Parent\bin\...

the solution would fail also (but it should work in this
special case at least)

Hope I was clear enough.



Date: 2004-12-30 16:35
Sender: driesengProject AdminAccepting Donations

Logged In: YES
user_id=707851

Gert,

When no output directory is specified and the reference
cannot be resolved using assembly folders, then the hintpath
is used to determine the path of an assembly.

In your case, the reference to MyCompany.Lib_General in the
Lib_Specific project has a hintpath (..\Lib_Parent...) that
does not match the output path of the Lib_General project,
which is why we can't detect that it actually references the
Lib_General project.

Now, we could change it to match assembly and project
references on assembly name instead of file name. But I'm
not sure if this is better or worse than matching on file name.

What do you think ?


Date: 2004-12-30 13:29
Sender: gkello

Logged In: YES
user_id=103371

Seems like I have to reopen the bug... A modified the build
file a little bit, and it fails again..
{Changed
<solution configuration="debug"
outputdir="${build.dir}/bin" >
to
<solution configuration="debug" >

in Fail2 task
}


Or maybe shoudl it be another report?


Date: 2004-12-11 07:36
Sender: driesengProject AdminAccepting Donations

Logged In: YES
user_id=707851

This issue is now fixed in cvs.

Thanks for the report !


Attached Files ( 2 )

Filename Description Download
NantSolutionTest.zip Simple example do reproduce the bug. Download
NantSolutionTest.zip Modified build file Download

Changes ( 10 )

Field Old Value Date By
status_id Open 2004-12-30 18:33 drieseng
close_date 2004-12-11 07:36 2004-12-30 18:33 drieseng
File Added 113889: NantSolutionTest.zip 2004-12-30 13:29 gkello
status_id Closed 2004-12-30 13:29 gkello
assigned_to nobody 2004-12-11 07:36 drieseng
close_date - 2004-12-11 07:36 drieseng
status_id Open 2004-12-11 07:36 drieseng
resolution_id None 2004-12-11 07:36 drieseng
category_id None 2004-12-11 07:36 drieseng
File Added 110697: NantSolutionTest.zip 2004-11-30 14:12 gkello