Search code examples
nuget-packageappveyor

Appveyor seems to ignore infomational version


I'm trying to get my NuGet package to be versioned by AssemblyInformationalVersion while keeping AssemblyVersion same. I use tag $version$ in my .nuspec.

However, if I build NuGet using appveyor, it keeps up using AssemblyVersion.

My appveyor.yaml:

version: 1.0.{build}
pull_requests:
  do_not_increment_build_number: true
configuration: Release
assembly_info:
   patch: true
   file: '**\AssemblyInfo.*'
   assembly_file_version: '{version}'
   assembly_informational_version: '{version}'
before_build:
   nuget restore
build:
   publish_nuget: true
   parallel: true
   verbosity: minimal
deploy:
   provider: NuGet
   api_key: <SKIPPED>

My .nuspec excerpt

<metadata>
 ....
    <version>$version$</version>
 ....
</metadata>

UPD: I checked that informational version set correctly to files: Informational version

Also, I don't know if it related, but it seems to ignore my <files> directive and put everything into lib instead of analyzers\dotnet\cs


Solution

  • This often happens if AssemblyInfo.* file does not contain AssemblyInformational tag. In this case AppVeyor has nothing to patch.