Skip to content

Issue running dotnet publish with --output property set #8194

@vukvucic

Description

@vukvucic

Description

Our pipeline on Azure running the DotNetCoreCLI@2 - .NET Core v2 task no longer seems to work because of the --output property set.

This property is still outlined in the Microsoft documentation for the dotnet publish command https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish but we can no longer use it.

Configuration

.NET version: 7.0.*

Previous working version
MSBuild version 17.4.1+9a89d02ff for .NET

Current version
MSBuild version 17.5.0-preview-23061-01+040e2a90e for .NET

At the moment we haven't found a way to limit the MSBuild version so we are unable to go back to the working version.

Error message

MSBuild version 17.5.0-preview-23061-01+040e2a90e for .NET
D:\Agent_Dps2\_work\_tool\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. [D:\Agent_Dps2\_work\32\s\Project.sln]
##[error]Error: The process 'D:\Agent_Dps2\_work\_tool\dotnet\dotnet.exe' failed with exit code 1

Other information

There seems to have been a bug about this in a previous version that was fixed but it may have regressed: dotnet/runtime#79330.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions