Author: brett
Date: Sat Jun 25 04:34:34 2011
New Revision: 1139491
URL: http://svn.apache.org/viewvc?rev=1139491&view=rev
Log:
[NPANDAY-445] catch the case where a unique dependency is shown as well
Modified:
incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/NPanday/ProjectImporter/Digest/Algorithms/NormalProjectDigestAlgorithm.cs
Modified:
incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/NPanday/ProjectImporter/Digest/Algorithms/NormalProjectDigestAlgorithm.cs
URL:
http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/NPanday/ProjectImporter/Digest/Algorithms/NormalProjectDigestAlgorithm.cs?rev=1139491&r1=1139490&r2=1139491&view=diff
==============================================================================
---
incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/NPanday/ProjectImporter/Digest/Algorithms/NormalProjectDigestAlgorithm.cs
(original)
+++
incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/NPanday/ProjectImporter/Digest/Algorithms/NormalProjectDigestAlgorithm.cs
Sat Jun 25 04:34:34 2011
@@ -216,24 +216,25 @@ namespace NPanday.ProjectImporter.Digest
{
Console.WriteLine("Unable to find
reference '" + buildItem.Include + "' in " + string.Join("; ", refs.ToArray()));
}
- else
+ else if (refs.Count > 1)
{
- if (refs.Count > 1)
+ string best = null;
+ string bestFramework = "0.0";
+ foreach (string s in refs)
{
- string best = null;
- string bestFramework = "0.0";
- foreach (string s in refs)
+ Assembly a =
Assembly.ReflectionOnlyLoad(s);
+ string framework =
a.ImageRuntimeVersion.Substring(1,3);
+ if
(framework.CompareTo(targetFramework) <= 0 &&
framework.CompareTo(bestFramework) > 0)
{
- Assembly a =
Assembly.ReflectionOnlyLoad(s);
- string framework =
a.ImageRuntimeVersion.Substring(1,3);
- if
(framework.CompareTo(targetFramework) <= 0 &&
framework.CompareTo(bestFramework) > 0)
- {
- best = s;
- bestFramework =
framework;
- }
+ best = s;
+ bestFramework = framework;
}
-
reference.SetAssemblyInfoValues(best);
}
+
reference.SetAssemblyInfoValues(best);
+ }
+ else
+ {
+
reference.SetAssemblyInfoValues(refs[0]);
}
}
}