{
"$type": "site.standard.document",
"canonicalUrl": "https://johnnyreilly.com/posts/setting-build-version-using-appveyor",
"description": "AppVeyor doesnt have support for setting version of a binary in dot net core, but it can be done easily through PowerShell.",
"path": "/posts/setting-build-version-using-appveyor",
"publishedAt": "2017-04-25T00:00:00.000Z",
"site": "at://did:plc:yy3apqjlms24kso7ahn7lbmb/site.standard.publication/3mova7c4nho2b",
"tags": [
"asp.net"
],
"textContent": "AppVeyor has support for setting the version of a binary during a build. However - this deals with the classic ASP.Net world of AssemblyInfo. I didn't find any reference to support for doing the same with dot net core. Remember, dot net core relies upon a <Version> or a <VersionPrefix> setting in the .csproj file. Personally, <Version> is my jam.\n\n\n\nHowever, coming up with your own bit of powershell that stamps the version during the build is a doddle; here we go:\n\nYou can invoke this script as part of the build process in AppVeyor by adding something like this to your appveyor.yml.\n\nIt will keep the first 3 parts of the version in your .csproj (eg \"1.0.0\") and suffix on the build number supplied by AppVeyor.",
"title": "Setting Build Version Using AppVeyor and ASP.Net Core"
}