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

How can I automatically increment the version of my local NuGet (Baget) package in my .csproj file

$
0
0

We use local NuGet (BaGet) to store our custom packages. We assign a new version number for each update we make. I am sharing code snipped from my .csproj file in the below:

<PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><RootNamespace>Macha.Abp.Common</RootNamespace><GeneratePackageOnBuild>True</GeneratePackageOnBuild><PackageReadmeFile>README.md</PackageReadmeFile><Version>5.3.3.23</Version></PropertyGroup>

Every single time my package is updated, I must update the version number (5.3.3.23, 5.3.3.24 , 5.3.3.25, 5.3.3.26, and so on). 5.3.3 is my framework version. By the way, we are using ABP Framework. I would like to read this version number from assemby like this:<Version>typeof(AbpModule).Assembly.GetFileVersion()+"23"</Version>, but I don't know how can I write this code.

If you have any other suggestions, I would be happy to hear them.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



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