Make publish require and entrypoint
This commit is contained in:
parent
f8837f7717
commit
18595e221e
1 changed files with 8 additions and 0 deletions
|
@ -81,6 +81,14 @@ namespace Microsoft.DotNet.Tools.Publish
|
||||||
{
|
{
|
||||||
Reporter.Output.WriteLine($"Publishing {context.RootProject.Identity.Name.Yellow()} for {context.TargetFramework.DotNetFrameworkName.Yellow()}/{context.RuntimeIdentifier}");
|
Reporter.Output.WriteLine($"Publishing {context.RootProject.Identity.Name.Yellow()} for {context.TargetFramework.DotNetFrameworkName.Yellow()}/{context.RuntimeIdentifier}");
|
||||||
|
|
||||||
|
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))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue