我没有找到任何相关文档,所以如果它不能满足您的需求,您可以自行安装dotnet并使用命令完成您想要的操作(例如dotnet publish
)。
旧答案:
If you don't solve the problem with xbuild, you can try using dotnet cli. The install script for RTM is here:
https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.sh
Then you use
dotnet restore
anddotnet build
(cd to directory with project.json)Change your .travis.yml to this:
language: csharp install: curl -s https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.sh
| bash script: - dotnet restore WebApp/src/WebApp/project.json - dotnet build WebApp/src/WebApp/project.json addons:
apt: packages: - gettext - libcurl4-openssl-dev - libicu-dev - libssl-dev - libunwind8 - zlib1gI'm not sure all of the apt packages are necessary. source: http://andrewlock.net/adding-travis-ci-to-a-net-core-app/
It's also possible to use KoreBuild https://github.com/aspnet/KoreBuild/tree/1.0.0/template
script: ./build.sh //Add the file to repo
script: chmod a+x ./build.sh && ./build.sh
- J2ghzaddons: apt: packages: - libunwind8
(格式如答案所示,注释不能有换行符) - J2ghz