Skip to content

Commit 9c7c503

Browse files
committed
update.
1 parent db11dd1 commit 9c7c503

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

src/dotnet-svcutil/lib/src/CommandProcessorOptions.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -627,12 +627,7 @@ private async Task ProcessReferencesOptionAsync(CancellationToken cancellationTo
627627
{
628628
for (int idx = this.References.Count - 1; idx >= 0; idx--)
629629
{
630-
var selected = references.Where(x => string.Equals(this.References[idx].Name, x.Name, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
631-
if (selected != null)
632-
{
633-
this.References[idx] = selected;
634-
}
635-
else
630+
if (!references.Contains(this.References[idx]))
636631
{
637632
this.References.RemoveAt(idx);
638633
}

src/dotnet-svcutil/lib/src/Shared/Options/UpdateOptions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ public void ResolveFullPathsFrom(DirectoryInfo optionsFileDirectory)
134134
var reference = this.References[idx];
135135
if (reference.DependencyType == ProjectDependencyType.Project || reference.DependencyType == ProjectDependencyType.Binary)
136136
{
137-
this.References[idx].FullPath = Path.Combine(optionsFileDirectory.FullName, reference.ReferenceIdentity);
137+
string fullPath = Path.GetFullPath(Path.Combine(optionsFileDirectory.FullName, reference.ReferenceIdentity));
138+
this.References[idx].FullPath = fullPath;
139+
this.References[idx].ReferenceIdentity = fullPath;
138140
}
139141
}
140142
}

src/dotnet-svcutil/lib/src/Shared/ProjectDependency.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private ProjectDependency(string filePath = "", string packageName = "", string
153153

154154
this.ReferenceIdentity = this.DependencyType == ProjectDependencyType.Package || this.DependencyType == ProjectDependencyType.Tool || !string.IsNullOrWhiteSpace(packageName) ?
155155
string.Format(CultureInfo.InvariantCulture, "{0}, {{{1}, {2}}}", this.AssemblyName, this.Name, this.Version) :
156-
this.FullPath;
156+
filePath;
157157

158158
this.IsFramework = this.Name == NetCoreAppPackageID || this.Name == NetStandardLibraryPackageID;
159159
}

0 commit comments

Comments
 (0)