Skip to content

Commit

Permalink
Publish single file app needs slightly different command line args - …
Browse files Browse the repository at this point in the history
…take 2
  • Loading branch information
KyleKolander committed Oct 28, 2021
1 parent e129350 commit 18559c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
cat src/Directory.Build.props
- name: dotnet restore
run: dotnet restore --runtime ${{ matrix.target }} --verbosity minimal -graphBuild:true
run: dotnet restore --verbosity minimal -graphBuild:true

- name: dotnet build
run: dotnet build --configuration ${{ env.buildConfiguration }} --runtime ${{ matrix.target }} --no-restore --nologo --verbosity minimal -graphBuild:true -p:SelfContained=false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
cat src/Directory.Build.props
- name: dotnet restore
run: dotnet restore --runtime ${{ matrix.target }} --verbosity minimal -graphBuild:true
run: dotnet restore --verbosity minimal -graphBuild:true

# Windows
- name: dotnet build win-x64
Expand Down
5 changes: 2 additions & 3 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function Write-Header([string]$Message) {
}

Write-Header 'Restore'
dotnet restore --runtime $Runtime --verbosity minimal -graphBuild:true
dotnet restore --verbosity minimal -graphBuild:true

Write-Header 'Build'
dotnet build --configuration $Configuration --runtime $Runtime -p:Version=$Version --no-restore --nologo --verbosity minimal -graphBuild:true -p:SelfContained=false
Expand All @@ -32,8 +32,7 @@ dotnet publish .\src\Summarizer\Summarizer.csproj --output "$OutDirPublish/Summa
#
# https://github.com/dotnet/runtime/issues/3569#issuecomment-920285890
#
# Need to use --runtime $Runtime on each step.
# Need to use -p:SelfContained=false on each step except restore.
# Need to use --runtime $Runtime and -p:SelfContained=false on each step except restore.
#
# Without this, the published single file executable will not run and you'll have errors like this:
#
Expand Down

0 comments on commit 18559c6

Please sign in to comment.