Add Microsoft.DotNet.Tools.Interactive

This commit is contained in:
Charles Stoner 2015-10-30 10:34:02 -07:00
commit e2cdf17e2e
14 changed files with 278 additions and 37 deletions

View file

@ -46,33 +46,23 @@ namespace Microsoft.DotNet.Tools.Compiler
var buildProjectReferences = !noProjectDependencies.HasValue();
var isNative = native.HasValue();
var configValue = configuration.Value() ?? Constants.DefaultConfiguration;
var outputValue = output.Value();
// Load project contexts for each framework and compile them
bool success = true;
if (framework.HasValue())
var contexts = framework.HasValue() ?
framework.Values.Select(f => ProjectContext.Create(path, NuGetFramework.Parse(f))) :
ProjectContext.CreateContextForEachFramework(path);
foreach (var context in contexts)
{
foreach (var context in framework.Values.Select(f => ProjectContext.Create(path, NuGetFramework.Parse(f))))
success &= Compile(context, configValue, outputValue, intermediateOutput.Value(), buildProjectReferences);
if (isNative)
{
success &= Compile(context, configuration.Value() ?? Constants.DefaultConfiguration, output.Value(), intermediateOutput.Value(), buildProjectReferences);
if (isNative)
{
success &= CompileNative(context, configuration.Value() ?? Constants.DefaultConfiguration, output.Value(), buildProjectReferences);
}
success &= CompileNative(context, configValue, outputValue, buildProjectReferences);
}
}
else
{
foreach (var context in ProjectContext.CreateContextForEachFramework(path))
{
success &= Compile(context, configuration.Value() ?? Constants.DefaultConfiguration, output.Value(), intermediateOutput.Value(), buildProjectReferences);
if (isNative)
{
success &= CompileNative(context, configuration.Value() ?? Constants.DefaultConfiguration, output.Value(), buildProjectReferences);
}
}
}
return success ? 0 : 1;
});

View file

@ -12,6 +12,7 @@
"System.Linq": "4.0.1-beta-23504",
"System.Diagnostics.Process": "4.1.0-beta-23504",
"System.IO.FileSystem": "4.0.1-beta-23504",
"System.AppContext": "4.0.1-beta-23504",
"Microsoft.DotNet.ProjectModel": "1.0.0-*",
"Microsoft.DotNet.Compiler.Common": "1.0.0-*",
@ -22,8 +23,7 @@
"Microsoft.Extensions.CommandLineUtils.Sources": {
"type": "build",
"version": "1.0.0-*"
},
"Microsoft.Net.Compilers.netcore": "1.1.0-*"
}
},
"frameworks": {
"dnxcore50": { }