I'm using Github Package Registry for my own nuget packages. Here is my dotnet nuget push command.
dotnet nuget push "bin/Release/${ProjectName}.${PackageVersion}.nupkg" --source <MY_NUGET_SOURCE> --api-key <MY_API_KEY>
${ProjectName}
-> Works fine and gives the selected project's name.${PackageVersion}
or${Version}
-> Doesn't work for me.
I want to pass the Version/PackageVersion
value where is defined in .csproj
too. How can I do that?
<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><TargetFramework>net5.0</TargetFramework><PackageTags>Some tags</PackageTags><Title>SomeTitle</Title><RepositoryUrl>My RepositoryUrl</RepositoryUrl><PackageId>MyPackageId</PackageId><PackageVersion>1.0.6</PackageVersion></PropertyGroup></Project>