Fix project.json dependencies and System.Private.CoreLib reference
This commit is contained in:
parent
88806eb7de
commit
8023ec22d2
2 changed files with 4 additions and 12 deletions
|
@ -20,14 +20,6 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
{ NativeIntermediateMode.ryujit, ".obj" }
|
||||
};
|
||||
|
||||
private static readonly Dictionary<OSMode, string> OSCoreLibNameMap = new Dictionary<OSMode, string>()
|
||||
{
|
||||
{OSMode.Windows, "System.Private.CoreLib.dll" },
|
||||
{OSMode.Linux, "System.Private.Corelib.dll" },
|
||||
{OSMode.Mac, "System.Private.Corelib.dll" },
|
||||
};
|
||||
|
||||
|
||||
private string ArgStr { get; set; }
|
||||
private NativeCompileSettings config;
|
||||
|
||||
|
@ -54,7 +46,8 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
argsList.Add($"\"{inputFilePath}\"");
|
||||
|
||||
// System.Private.CoreLib Reference
|
||||
var coreLibPath = Path.Combine(config.IlcPath, OSCoreLibNameMap[config.OS]);
|
||||
String[] coreLibs = new String[] { "System.Private.CoreLib.dll", "System.Private.Corelib.dll" };
|
||||
var coreLibPath = Path.Combine(config.IlcPath, Array.Find(coreLibs, lib => File.Exists(Path.Combine(config.IlcPath, lib))));
|
||||
argsList.Add($"-r \"{coreLibPath}\"");
|
||||
|
||||
// Dependency References
|
||||
|
|
|
@ -23,9 +23,8 @@
|
|||
"type": "build",
|
||||
"version": "1.0.0-*"
|
||||
},
|
||||
"Microsoft.DotNet.ILCompiler": "1.0.2-*",
|
||||
"Microsoft.DotNet.ObjectWriter": "1.0.2-*",
|
||||
"Microsoft.DotNet.RyuJit": "1.0.0-*",
|
||||
"Microsoft.DotNet.ILCompiler": "1.0.3-*",
|
||||
"Microsoft.DotNet.ILCompiler.SDK": "1.0.3-*",
|
||||
"Microsoft.DotNet.Compiler.Common": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
|
|
Loading…
Reference in a new issue