@@ -218,7 +218,7 @@ public void ItHandlesReferenceAndPackageReferenceNameCollisions()
218
218
}
219
219
220
220
// If an assembly is in withResources, it has to be a key in dependencies, even with an empty list.
221
- private DependencyContext BuildDependencyContextFromDependenciesWithResources ( Dictionary < string , List < string > > dependencies , List < string > withResources , List < string > directReferences )
221
+ private static DependencyContext BuildDependencyContextFromDependenciesWithResources ( Dictionary < string , List < string > > dependencies , List < string > withResources , List < string > references )
222
222
{
223
223
string mainProjectName = "simpleApp" ;
224
224
LockFile lockFile = TestLockFiles . GetLockFile ( mainProjectName ) ;
@@ -231,7 +231,7 @@ private DependencyContext BuildDependencyContextFromDependenciesWithResources(Di
231
231
[ ] ) ;
232
232
string mainProjectDirectory = Path . GetDirectoryName ( mainProject . ProjectPath ) ;
233
233
234
- ITaskItem [ ] referencePaths = directReferences . Select ( reference =>
234
+ ITaskItem [ ] referencePaths = references . Select ( reference =>
235
235
new MockTaskItem ( $ "/usr/Path/{ reference } .dll", new Dictionary < string , string > {
236
236
{ "CopyLocal" , "false" } ,
237
237
{ "FusionName" , $ "{ reference } , Version=4.0.0.0, Culture=neutral, PublicKeyToken=null" } ,
@@ -279,18 +279,9 @@ private DependencyContext BuildDependencyContextFromDependenciesWithResources(Di
279
279
280
280
CompilationOptions compilationOptions = CreateCompilationOptions ( ) ;
281
281
282
- /* IEnumerable<ReferenceInfo> references =
283
- ReferenceInfo.CreateDirectReferenceInfos(
284
- referencePaths,
285
- [],
286
- lockFileLookup: new LockFileLookup(lockFile),
287
- i => true,
288
- true);
289
- */
290
282
return new DependencyContextBuilder ( mainProject , includeRuntimeFileVersions : false , runtimeGraph : null , projectContext : projectContext , libraryLookup : new LockFileLookup ( lockFile ) )
291
283
. WithReferenceAssemblies ( ReferenceInfo . CreateReferenceInfos ( referencePaths ) )
292
284
. WithCompilationOptions ( compilationOptions )
293
- // .WithDirectReferences(references)
294
285
. WithReferenceProjectInfos ( referenceProjectInfos )
295
286
. Build ( ) ;
296
287
}
0 commit comments