Enumerate dlls in AppDep and ILC SDK

This commit is contained in:
Senthil 2016-01-08 22:29:53 -08:00 committed by schellap
parent ecda2a8106
commit e03713fcc7
2 changed files with 10 additions and 10 deletions

View file

@ -45,9 +45,12 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
var inputFilePath = config.InputManagedAssemblyPath;
argsList.Add($"\"{inputFilePath}\"");
// System.Private.CoreLib Reference
var coreLibPath = Path.Combine(config.IlcSdkPath, "sdk", "*.dll");
argsList.Add($"-r \"{coreLibPath}\"");
// System.Private.* References
var coreLibsPath = Path.Combine(config.IlcSdkPath, "sdk");
foreach (var reference in Directory.EnumerateFiles(coreLibsPath, "*.dll"))
{
argsList.Add($"-r \"{reference}\"");
}
// AppDep References
foreach (var reference in config.ReferencePaths)

View file

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.Tools.Compiler.Native
@ -80,12 +81,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
{
get
{
var referencePaths = new List<string>(_referencePaths)
{
Path.Combine(AppDepSDKPath, "*.dll")
};
return referencePaths;
return _referencePaths;
}
}
@ -163,7 +159,6 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
private NativeCompileSettings()
{
_linkLibPaths = new List<string>();
_referencePaths = new List<string>();
IlcPath = AppContext.BaseDirectory;
@ -173,6 +168,8 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
BuildType = DefaultBuiltType;
NativeMode = DefaultNativeModel;
AppDepSDKPath = Path.Combine(AppContext.BaseDirectory, "appdepsdk");
_referencePaths = new List<string>(Directory.EnumerateFiles(AppDepSDKPath, "*.dll"));
}
public static NativeCompileSettings Default