#239 "solution" task and project reference parsing

0.85
closed-fixed
Tasks (408)
5
2004-12-30
2004-11-30
Gert Kello
No

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).

Discussion

  • Gert Kello

    Gert Kello - 2004-11-30

    Simple example do reproduce the bug.

     
  • Gert Driesen

    Gert Driesen - 2004-12-11
    • labels: --> Tasks
    • assigned_to: nobody --> drieseng
    • status: open --> closed-fixed
     
  • Gert Driesen

    Gert Driesen - 2004-12-11

    Logged In: YES
    user_id=707851

    This issue is now fixed in cvs.

    Thanks for the report !

     
  • Gert Kello

    Gert Kello - 2004-12-30
    • status: closed-fixed --> open-fixed
     
  • Gert Kello

    Gert Kello - 2004-12-30

    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?

     
  • Gert Kello

    Gert Kello - 2004-12-30

    Modified build file

     
  • Gert Driesen

    Gert Driesen - 2004-12-30

    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 ?

     
  • Gert Kello

    Gert Kello - 2004-12-30

    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.

     
  • Gert Driesen

    Gert Driesen - 2004-12-30

    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).

     
  • Gert Driesen

    Gert Driesen - 2004-12-30
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks