|
|
|
@ -108,7 +108,7 @@ namespace ICSharpCode.PackageManagement
@@ -108,7 +108,7 @@ namespace ICSharpCode.PackageManagement
|
|
|
|
|
|
|
|
|
|
ReferenceProjectItem FindReference(string name) |
|
|
|
|
{ |
|
|
|
|
string referenceName = Path.GetFileNameWithoutExtension(name); |
|
|
|
|
string referenceName = GetReferenceName(name); |
|
|
|
|
foreach (ReferenceProjectItem referenceProjectItem in project.GetItemsOfType(ItemType.Reference)) { |
|
|
|
|
if (IsMatchIgnoringCase(referenceProjectItem.Include, referenceName)) { |
|
|
|
|
return referenceProjectItem; |
|
|
|
@ -117,6 +117,22 @@ namespace ICSharpCode.PackageManagement
@@ -117,6 +117,22 @@ namespace ICSharpCode.PackageManagement
|
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
string GetReferenceName(string name) |
|
|
|
|
{ |
|
|
|
|
if (HasDllOrExeFileExtension(name)) { |
|
|
|
|
return Path.GetFileNameWithoutExtension(name); |
|
|
|
|
} |
|
|
|
|
return name; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool HasDllOrExeFileExtension(string name) |
|
|
|
|
{ |
|
|
|
|
string extension = Path.GetExtension(name); |
|
|
|
|
return |
|
|
|
|
IsMatchIgnoringCase(extension, ".dll") || |
|
|
|
|
IsMatchIgnoringCase(extension, ".exe"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool IsMatchIgnoringCase(string lhs, string rhs) |
|
|
|
|
{ |
|
|
|
|
return String.Equals(lhs, rhs, StringComparison.InvariantCultureIgnoreCase); |
|
|
|
|