VSTS package step exclude files

We are migrating from TFS to VSTS.
When using the VSTS package step, my assumption was that this would be a Nuget like process where you can specify the files to be included and the ones to be excluded.
The step seems to not provide that functionality,
I’ve read in the forums that some people are just using a file copy step to copy only the wanted files to a new folder and then run the VSTS package step pointing there. Although this works, I can’t see why this has to be done as being able to specify what you want to package just makes sense, does it not?
Love the product and I hate doing hacks on functionality that should just be there.

Hi Jorge,

Thanks for getting in touch. The right answer to how to set things up depends on what type of application you are building. For example, .NET Framework and .NET Core applications have different build mechanics and the setup is different.

If you are building using MSBuild then your best bet would be along the lines illustrated in our documentation for VSTS. OctoPack uses NuGet.exe under the hood, and you can use a .nuspec to get very fine grained control over what you do/don’t want included. This does not require the use of the Package Application step.

For other types of applications, including .NET Core applications, you have to do a publish to another folder first to allow the publish process to do it’s job in transforming the project content into the correct format. You can control which files get included in this method by setting their build type to Content. You then use the Package Application step to bundle that folder into a Zip/NuGet package. The step uses Octo.exe under the hood, and it’s packaging is based simply on compressing a folder.

Hope that helps clarify.

Regards
Shannon

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.