Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET Core startup script: Run app executable if present, else fallback to app's dll #138

Merged
merged 3 commits into from
May 15, 2019

Conversation

kichalla
Copy link
Contributor

This is to support the following scenarios:

  1. End users can do a zip deploy of a self-contained app into AppService and our runtime container should use the executable,
    so instead of doing 'dotnet myappname.dll', we should run './myappname'. This is because the whole point of self-contained app
    is to use the packaged runtime which is present in the output.
  2. Starting 3.0 .NET Core, a regular 'dotnet publish' creates both the executable and dll.

…k to app's dll

This is to support the following scenarios:
1. End users can do a zip deploy of a self-contained app into AppService and our runtime container should use the executable,
   so instead of doing 'dotnet myappname.dll', we should run './myappname'. This is because the whole point of self-contained app
   is to use the packaged runtime which is present in the output.
2. Starting 3.0 .NET Core, a regular 'dotnet publish' creates both the executable and dll.
@kichalla kichalla requested a review from a team as a code owner May 15, 2019 00:35
scriptBuilder.WriteString(" startUpCommand=\"$userStartUpCommand\"\n")
scriptBuilder.WriteString(" if [ -f \"$userStartUpCommand\" ]; then\n")
scriptBuilder.WriteString(" chmod 755 \"$userStartUpCommand\"\n")
scriptBuilder.WriteString(" len=${#userStartUpCommand[@]}\n")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new block keeps the logic that AppService currently uses

@@ -7,7 +7,7 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace NetCoreApp30WebApp
namespace NetCoreApp30.WebApp
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to verify if having a . in the name breaks the tests

@kichalla kichalla merged commit 6e307f1 into master May 15, 2019
@kichalla kichalla deleted the kichalla/dotnetcore.selfcontained.apps branch May 15, 2019 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants