Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

How to pass Version/PackageVersion parameter to DotNet Core CLi

$
0
0

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>

Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>