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

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tasks
Group: 0.85
Status: Open
Resolution: None
Priority: 5
Submitted By: Manu (manudea)
Assigned to: Nobody/Anonymous (nobody)
Summary: Different projects with same guid in a solution fail

Initial Comment:
Apply to nant 85 and 84 (maybe others)

If you have 2 projects with same guid in a visual studio 
solution only the latter one is built. The first one is 
ignored.

I think this is a Nant bug because VStudio builds just 
fine, so Nant should, IMHO, build in the same way as 
Vstudio does.
Assuming that guid uniqueness exists in Vs solution it 
seems a wrong assumpton. If it would VS would 
complaint about this an do not build.


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

Comment By: Matt Trentini (matt_trentini)
Date: 2005-08-08 19:35

Message:
Logged In: YES 
user_id=667724

There's a couple of issues here.  

Firstly, Nant rightly points out that, within a solution
file, unique GUIDs for projects are required.  Without
unique GUIDs project dependencies will be broken (I'm
referring to VS2003 here).  

Visual Studio doesn't report this issue and it should - I
suggest leaving it in for Nant.

The second issue is that Nant's solution task insists that
the projects referred to in the solution file has the same
GUID as that found in the actual project files.  This is
more restrictive, thought arguably more correct, than Visual
Studio's requirements and I would like to see Nant's
behaviour mirror VS in this case (ie build anyway).  The
GUID's do not need to match up as far as I'm aware.

Ideally it'd be great to produce (optional) warnings.

I've written a Perl script that gets around the second
issue.  It replaces any project GUIDs in the solution file
with the correct GUIDs from the project file.  It also helps
with the first issue as it will detect duplicate GUIDs
within the solution file.  I could tidy it up and submit it
somewhere if anyone needs such a script...?

Cheers,
Matt

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

Comment By: Martin Aliger (maliger)
Date: 2005-06-14 03:32

Message:
Logged In: YES 
user_id=655297

I think NAnts behaviour is correct. I mean BuildException 
when solution contains two projects with same GUIDs.

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

Comment By: Nicklas Norling (exinor)
Date: 2005-03-06 07:18

Message:
Logged In: YES 
user_id=949257

Nant used to give NullReferenceException when GUIDs where
not unique. I submitted a patch that writes a (hopefully)
descriptive error when this is encountered and the compile
should stop. Isn't the error still there?
I think Nant could possibly try to match the project names
if GUIDs are not unique and get a bit further, but as
pointed out it has to be considered a bug that VS isn't
alerting the user, or recreates the duplicate GUID.
/Nicke

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

Comment By: Alex Hildyard (ahildyard)
Date: 2005-02-22 02:05

Message:
Logged In: YES 
user_id=1114643

I actually think NAnt's behaviour is more "correct" than Visual 
Studio. Assuming that GUIDs are supposed to provide a 
mapping between project files and the project references 
within a solution file, I regard Visual Studio as defective 
because it will often continue to build solutions perfectly 
happily even when the two GUIDs don't match. This is clearly 
a recipe for disaster, since at some point Visual Studio's often 
inspired guesswork matching projects to solutions is going to 
be wrong.

However, I agree that NAnt's behaviour isn't perfect. I would 
like to see NAnt throw an error if it finds duplicate GUIDs; I 
agree that silently building one of the projects and ignoring 
the other isn't the best behaviour. But I don't think 
reproducing Visual Studio's behaviour is the way to go.

Just my tuppenceworth.

Regards,

Alex


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

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


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to