title: Setting the version number from jenkins for .NET Core projects - CSPROJ
body: <p>I have executed the following shell command to publish my ASP.NET core project using Jenkins. The output type of my project is exe.</p>
  
  <p>The problem I am facing is the version number of the exe file does not get updated consistently. The file and product version is getting updated only when I make a new change to the .csproj file. If there are no changes to the .csproj, the exe file retains the previous version number. How do I update the version number every time I publish a new build using jenkins?</p>
  
  <pre><code>dotnet clean
  dotnet restore
  dotnet msbuild 'myproj/myproj.csproj' /t:publish /p:Configuration='Release' /p:PublishDir='C:\myproj' /p:Version=1.0.0.${BUILD_NUMBER}
  </code></pre>