dotnet pack --output is broken in 6.0.* SDK Releases
- Dominant language
- PowerShell
- Stars
- 22k
- Forks
- 4.9k
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 29
Description
### Description
The following GHA against a solution fails:
```
jobs:
buildpack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Setup .NET Core
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
uses: actions/setup-dotnet@v3
with:
# Versions found here: https://github.com/dotnet/core/tree/main/release-notes/6.0
dotnet-version: '6.0.*'
- name: Pack with dotnet
run: dotnet pack ${{ inputs.SLN }} --output nuget-packages --configuration Release
```
with the following error:
```
Run actions/setup-dotnet@v3
/home/runner/work/_actions/actions/setup-dotnet/v3/externals/install-dotnet.sh --version [6](https://github.com/rtkwlf/SATModels/actions/runs/4297270061/jobs/7490056737#step:4:7).0.200
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
dotnet-install: Attempting to download using primary link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.200/dotnet-sdk-6.0.200-linux-x64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.200/dotnet-sdk-6.0.200-linux-x64.tar.gz
dotnet-install: Installed version is 6.0.200
dotnet-install: Adding to current process PATH: `/usr/share/dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.
```
```
MSBuild version 17.5.0-preview-23061-01+040e2a90e for .NET
Determining projects to restore...
All projects are up-to-date for restore.
Error: /usr/share/dotnet/sdk/7.0.200/Current/SolutionFile/ImportAfter/Microsoft.NET.Sdk.Solution.targets(36,5): error NETSDK1194: The "--output" option isn't supported when building a solution. [/home/runner/work/MyProject.sln]
Error: Process completed with exit code 1.
```
### Configuration
Linux-x64
### Regression?
With ZERO code changes, this code worked last week.
Contributor guide
Assessment
This issue has not been assessed yet.