File tree 3 files changed +17
-2
lines changed
tests/Baselines/MultiTargetTypeReuse/TypeReuseClient/ServiceReference
3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -627,7 +627,12 @@ private async Task ProcessReferencesOptionAsync(CancellationToken cancellationTo
627
627
{
628
628
for ( int idx = this . References . Count - 1 ; idx >= 0 ; idx -- )
629
629
{
630
- if ( ! references . Contains ( this . References [ idx ] ) )
630
+ var selected = references . Where ( x => this . References [ idx ] . Name == x . Name ) . FirstOrDefault ( ) ;
631
+ if ( selected != null )
632
+ {
633
+ this . References [ idx ] = selected ;
634
+ }
635
+ else
631
636
{
632
637
this . References . RemoveAt ( idx ) ;
633
638
}
Original file line number Diff line number Diff line change @@ -97,6 +97,16 @@ public void MakePathsRelativeTo(DirectoryInfo optionsFileDirectory)
97
97
this . Inputs [ idx ] = new Uri ( relPath , UriKind . Relative ) ;
98
98
}
99
99
}
100
+
101
+ //update referenced assembly path
102
+ for ( int idx = 0 ; idx < this . References . Count ; idx ++ )
103
+ {
104
+ var reference = this . References [ idx ] ;
105
+ if ( reference . DependencyType . Equals ( ProjectDependencyType . Binary ) )
106
+ {
107
+ this . References [ idx ] = ProjectDependency . FromAssembly ( reference . AssemblyName ) ;
108
+ }
109
+ }
100
110
}
101
111
102
112
public void ResolveFullPathsFrom ( DirectoryInfo optionsFileDirectory )
Original file line number Diff line number Diff line change 10
10
],
11
11
"outputFile" : " Reference.cs" ,
12
12
"references" : [
13
- " $TEMP$MultiTargetTypeReuse//TypeReuseClient//bin//Debug//net6.0// BinLib.dll "
13
+ " BinLib"
14
14
],
15
15
"targetFramework" : " N.N" ,
16
16
"typeReuseMode" : " All"
You can’t perform that action at this time.
0 commit comments