@@ -249,7 +249,7 @@ private static void WriteFile(string filePath, string text)
249249 return null ;
250250 }
251251
252- // File format: tab-separated fields (AssemblyPath, Kind, Spec), one reference per line.
252+ // File format: tab-separated fields (AssemblyPath, Kind, Spec, AdditionalSpec ), one reference per line.
253253 // Keep in sync with SaveDeclaredReferences in CollectDeclaredReferencesTask.cs.
254254 private static IEnumerable < DeclaredReference > ReadDeclaredReferences ( SourceText sourceText )
255255 {
@@ -267,6 +267,7 @@ private static IEnumerable<DeclaredReference> ReadDeclaredReferences(SourceText
267267
268268 int firstTab = - 1 ;
269269 int secondTab = - 1 ;
270+ int thirdTab = - 1 ;
270271 for ( int i = start ; i < end ; i ++ )
271272 {
272273 if ( sourceText [ i ] == '\t ' )
@@ -275,21 +276,26 @@ private static IEnumerable<DeclaredReference> ReadDeclaredReferences(SourceText
275276 {
276277 firstTab = i ;
277278 }
278- else
279+ else if ( secondTab == - 1 )
279280 {
280281 secondTab = i ;
282+ }
283+ else
284+ {
285+ thirdTab = i ;
281286 break ;
282287 }
283288 }
284289 }
285290
286- if ( firstTab == - 1 || secondTab == - 1 )
291+ if ( firstTab == - 1 || secondTab == - 1 || thirdTab == - 1 )
287292 {
288293 yield break ;
289294 }
290295
291296 string assemblyPath = sourceText . ToString ( TextSpan . FromBounds ( start , firstTab ) ) ;
292- string spec = sourceText . ToString ( TextSpan . FromBounds ( secondTab + 1 , end ) ) ;
297+ string spec = sourceText . ToString ( TextSpan . FromBounds ( secondTab + 1 , thirdTab ) ) ;
298+ string additionalSpec = sourceText . ToString ( TextSpan . FromBounds ( thirdTab + 1 , end ) ) ;
293299
294300 // Determine kind without allocating a string. The three possible values are
295301 // "Reference" (len 9), "ProjectReference" (len 16), "PackageReference" (len 16).
@@ -312,7 +318,7 @@ private static IEnumerable<DeclaredReference> ReadDeclaredReferences(SourceText
312318 continue ;
313319 }
314320
315- yield return new DeclaredReference ( assemblyPath , kind , spec ) ;
321+ yield return new DeclaredReference ( assemblyPath , kind , spec , additionalSpec ) ;
316322 }
317323 }
318324}
0 commit comments