In our dotnet framework project we were using AppVeyor to publish our Nuget packages after a successful build. We were using the 'Package Nuget Projects' setting under the Automatic Packaging section of the build settings. Our solution has a half dozen projects each generating a different Nuget package. This worked well for us with AppVeyor calling a 'dotnet pack' command on each project. However, after we moved many of our properties out of our .csproj files into a Directory.Build.props file to improve maintainability the call to 'dotnet pack' was no longer made. The build succeeded but no packaging occurred.
The documentation in AppVeyor : https://www.appveyor.com/docs/build-phase/#packaging-net-core-nuget-libraries indicates that any of a set of Properties should result in packaging. Some of those properties were still present on our projects so there must be something else.
An issue filed with AppVeyor here got a 'You should add a manual nuget pack to your project response.'
Has anyone else faced this problem and come up with a solution?
After much trial and error I discovered that the <TargetFramework>
property needed to be added back into our .csproj
files for AppVeyor's Automatic Packaging to work in addition to at least one of the other properties mentioned in the documentation.