dotnet pack PackageVersion fails when using short form of /property (/p:PackageVersion)
See original GitHub issueSteps to reproduce
$ dotnet pack ClassLibrary.csproj /p:PackageVersion=x.y.z
Expected behavior
Should have created a nuget package with the explicit version passed (x.y.z)
ClassLibrary.x.y.z.nupkg
Actual behavior
Microsoft ® Build Engine version 15.1.1012.6693 Copyright © Microsoft Corporation. All rights reserved. MSBUILD : error MSB1008: Only one project can be specified. Switch: p:PackageVersion=x.y.z
However if the msbuild long form of a property is used it works!!
dotnet pack ClassLibrary.csproj /property:PackageVersion=x.y.z
<= works fine
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.3)
Product Information: Version: 1.0.3 Commit SHA-1 hash: 37224c9917
Runtime Environment: OS Name: Windows OS Version: 6.1.7601 OS Platform: Windows RID: win7-x64 Base Path: C:\Program Files\dotnet\sdk\1.0.3
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (6 by maintainers)
@grajdeanserghei you wrote
/pproperty
instead of/property
, I suggest using-p:PackageVersion=1.2.3
@dasMulli , you’re right, I uploaded wrong screenshot I wanted to upload this one![image](https://user-images.githubusercontent.com/1830410/45600685-55196600-ba09-11e8-8fdc-41937740d698.png)
Indeed it works with
-p:PackageVersion=1.2.3
instead of/p:PackageVersion=1.2.3
. It works it bothgit bash
andcmd
. Probably documentation should use-p:
syntax instead.Anyway, I’ll open a new issue.
Thanks