Merge pull request #348 from dotnet/anurse/314-publish-library

allow dotnet-publish to publish a library
This commit is contained in:
Piotr Puszkiewicz 2015-12-01 00:34:04 -08:00
commit 95df133d7e
2 changed files with 7 additions and 10 deletions

View file

@ -95,12 +95,6 @@ namespace Microsoft.DotNet.Tools.Publish
var options = context.ProjectFile.GetCompilerOptions(context.TargetFramework, configuration); var options = context.ProjectFile.GetCompilerOptions(context.TargetFramework, configuration);
if (!options.EmitEntryPoint.GetValueOrDefault())
{
Reporter.Output.WriteLine($"{context.RootProject.Identity} does not have an entry point defined.".Red());
return 1;
}
// Generate the output path // Generate the output path
if (string.IsNullOrEmpty(outputPath)) if (string.IsNullOrEmpty(outputPath))
{ {
@ -145,8 +139,12 @@ namespace Microsoft.DotNet.Tools.Publish
PublishFiles(export.NativeLibraries, outputPath); PublishFiles(export.NativeLibraries, outputPath);
} }
// Publish the application itself // Publish a host if this is an application
PublishHost(context, outputPath); if (options.EmitEntryPoint.GetValueOrDefault())
{
Reporter.Verbose.WriteLine($"Making {context.ProjectFile.Name.Cyan()} runnable ...");
PublishHost(context, outputPath);
}
Reporter.Output.WriteLine($"Published to {outputPath}".Green().Bold()); Reporter.Output.WriteLine($"Published to {outputPath}".Green().Bold());
return 0; return 0;

View file

@ -1,8 +1,7 @@
{ {
"version": "1.0.0-*", "version": "1.0.0-*",
"dependencies": { "dependencies": {
"System.Runtime": "4.0.21-beta-23428", "System.Runtime": "4.0.21-beta-23428"
"Microsoft.NETCore.Runtime": "1.0.1-beta-23428"
}, },
"frameworks": { "frameworks": {