by nbarbettini
GitHub Readme.md
This is the Heroku buildpack for ASP.NET Core.
The Buildpack will search through the repository's folders to locate a Startup.cs
or Program.cs
file. If found, the .csproj
in the containing folder will be used in the dotnet publish <project>.csproj
command.
If repository contains multiple Web Applications (multiple Startup.cs
), PROJECT_FILE
and PROJECT_NAME
environment variables allow to choose project for publishing.
heroku buildpacks:set jincod/dotnetcore
heroku buildpacks:set https://github.com/jincod/dotnetcore-buildpack
heroku buildpacks:set https://github.com/jincod/dotnetcore-buildpack#version
Available releases
More info
You cannot run migrations with the dotnet ef
commands once the app is built. Alternatives include:
ASPNETCORE_ENVIRONMENT
environment variable is set to Production
. ASP.NET Core scaffolding tools may create files that explicitly set it to Development
. Heroku config will override this (heroku config:set ASPNETCORE_ENVIRONMENT=Production
)..csproj
file:<Target Name="PrePublishTarget" AfterTargets="Publish">
<Exec Command="dotnet ef database update" />
</Target>
sslmode=Prefer;Trust Server Certificate=true
heroku buildpacks:set jincod/dotnetcore
heroku buildpacks:add --index 1 heroku/nodejs
Using Multiple Buildpacks for an App
If this project help you, you can give me a cup of coffee ☕
Copy the snippet above into CLI.