Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

using .NET Core instead of Mono#7

Closed
noliar wants to merge 12 commits intoheroku:masterfrom
noliar:pr
Closed

using .NET Core instead of Mono#7
noliar wants to merge 12 commits intoheroku:masterfrom
noliar:pr

Conversation

@noliar
Copy link

@noliar noliar commented May 30, 2016

bin/util Outdated
Darwin) sed -l "$c";;
*) sed -u "$c";;
esac
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: missing newline

README.md Outdated
The buildpack will detect your app as ASP.NET 5 if it has `project.json`. If the source code you want to build contains multiple `project.json` files, you can use a [`.deployment`](https://github.com/projectkudu/kudu/wiki/Customizing-deployments) or set a `$PROJECT` config var to control which one is built.
The buildpack will detect your app as ASP.NET Core if it has `project.json`. If the source code you want to build contains multiple `project.json` files, you can use a [`.deployment`](https://github.com/projectkudu/kudu/wiki/Customizing-deployments) or set a `$PROJECT` config var to control which one is built.

## Attension
Copy link
Contributor

Choose a reason for hiding this comment

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

typo

Copy link
Author

Choose a reason for hiding this comment

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

I'm poor in English.
I think sentences in Attention should be more properly, but I don't know how to write.

bin/compile Outdated
echo "${PROJECT_NAME:=$PROJECT_DIR_NAME}"

echo "Restoring the packages"
dotnet restore ${PROJECT_JSON_FILE}

Choose a reason for hiding this comment

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

If the repository contains multiple projects this line won't restore all dependencies causing a runtime error. Instead should be dotnet restore ${SRC_DIR} or if the structure of repo contains src and tests folders (which usually it does), better yet dotnet restore ${SRC_DIR}/src

Copy link
Author

@noliar noliar Aug 18, 2016

Choose a reason for hiding this comment

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

@jenyayel
Yes I have known it before. But I think it's a bug(or feature?) of dotnet restore that it doesn't restore the reference-local project automatically.
If it restore projects at root path, I'm afraid that it may take too much time and size during restoring if sb. contains several unused project.

Choose a reason for hiding this comment

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

@noliar, I think it is a feature. Like before running (or packing in this case) your app (not just in .net), you need explicitly restore all packages.

It seems to me that in most of the cases when you deploy the repo, you aiming to restore everything (except for tests).

@jenyayel
Copy link

May I also suggest to add support for .post_compile script? The guy here implemented it and it works great for us:

if [ -f $SRC_DIR/.post_compile ]; then
    (cd $SRC_DIR && source .post_compile)
else
    echo "File $SRC_DIR/.post_compile not found"    
fi

@raphaeljlps
Copy link

Merge it, merge this for the glory 👍

@jenyayel
Copy link

jenyayel commented Dec 3, 2016

Probably won't happen. Two main contributors of this repo no longer work at Heroku. I contacted support of Heroku, they told that this repo is experimental and they way to go with .NET Core is to use Dockerfile.

@raphaeljlps
Copy link

Thank you for the answer @jenyayel
though I'm little 😕 about using Dockerfile

@jenyayel
Copy link

jenyayel commented Dec 3, 2016

Well, it's a new candy that every one tries to push. I wrote a short guideline that may be helpful. Good luck!

@friism
Copy link
Contributor

friism commented Dec 4, 2016

I updated my fork and sent a PR: #10

You can try my version here: https://github.com/friism/dotnet-buildpack

I just did this as an experiment to to see where the .NET Core toolchain was at.

As @jenyayel mentioned, the Docker approach works really well too. I built a full .NET Core Postgres example here: https://github.com/friism/heroku-docker-dotnet-core-postgres

@noliar noliar closed this Apr 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants