Fix project.json dependencies and System.Private.CoreLib reference

This commit is contained in:
Senthil 2015-12-07 19:20:00 -08:00
parent 88806eb7de
commit 8023ec22d2
2 changed files with 4 additions and 12 deletions

View file

@ -20,14 +20,6 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
{ NativeIntermediateMode.ryujit, ".obj" } { 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 string ArgStr { get; set; }
private NativeCompileSettings config; private NativeCompileSettings config;
@ -54,7 +46,8 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
argsList.Add($"\"{inputFilePath}\""); argsList.Add($"\"{inputFilePath}\"");
// System.Private.CoreLib Reference // 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}\""); argsList.Add($"-r \"{coreLibPath}\"");
// Dependency References // Dependency References

View file

@ -23,9 +23,8 @@
"type": "build", "type": "build",
"version": "1.0.0-*" "version": "1.0.0-*"
}, },
"Microsoft.DotNet.ILCompiler": "1.0.2-*", "Microsoft.DotNet.ILCompiler": "1.0.3-*",
"Microsoft.DotNet.ObjectWriter": "1.0.2-*", "Microsoft.DotNet.ILCompiler.SDK": "1.0.3-*",
"Microsoft.DotNet.RyuJit": "1.0.0-*",
"Microsoft.DotNet.Compiler.Common": "1.0.0-*" "Microsoft.DotNet.Compiler.Common": "1.0.0-*"
}, },
"frameworks": { "frameworks": {