0
votes

After using TeamCity, my build process is Visual Studio (sln) -> NuGet Pack. Everything builds fine and the artifact is created. But the artifact has every single file, include the .vbproj, .vb files, the classes folder which only holds .vb files.

Is there a way to turn a setting on to create the artifact which doesn't have all the .vb files etc due to them being compiled in the .dll?

2
There are a number of ways to control what is packaged, but it probably depends on what you're packaging. Is this a redistributed / shared component? - Evolve Software Ltd
How do you configure artifact paths? You can use exclude rules to exclude files of a certain extension, e.g. -:*/*.vb => report.zip. More examples here: confluence.jetbrains.com/display/TCD10/…. - Alina Mishina
I thought about the exclude in the nuspec file. Was just hoping that teamcity could have a toggle to be smart enough to exclude the files that are compiled. - zSKIz

2 Answers

0
votes

For anyone wondering, I just excluded the .vb files in the nuspec

0
votes

Have you considered using Octopack to package the nuget. It is smart enough to include all the required files into the package and will not require a custom nuspec file that you would need to source control and manage for any future changes.

IMO custom nuspec file should be used only if you have a very specific requirement such as if the target directory is different.

(mark as content and copy always for the files that you want to include)