Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 945075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:41:43+00:00 2026-05-15T22:41:43+00:00

We are using TeamCity 5.0 to build a C# solution using the sln2008 build

  • 0

We are using TeamCity 5.0 to build a C# solution using the sln2008 build runner. We have multiple projects that produce exe files. We want to use TeamCity’s artifacts feature to flatten all the directories. We want all the files to go into one folder with no sub folders no matter which folder it came from. TeamCity keeps the directory hierarchy when it created the artifacts.

Our artifacts are created using

**\bin\Release\*.*=>PublishedFiles

What we get is

  • PublishedFiles\FooProject\bin\Release\Foo.exe
  • PublishedFiles\BarProject\bin\Release\Bar.exe

What we want is

  • PublishedFiles\Foo.exe
  • PublishedFiles\Bar.exe

EDIT

TeamCity 5.1 will get us closer.

The pattern

SomeLibrary\bin\Release\*.dll => PublishedFiles

will get us

  • PublishedFiles\SomeLibrary.dll
  • PublishedFiles\SomeDependency.dll

but

**\bin\Release\*.dll => PublishedFiles

Will still keep the structure that we don’t want.

Currently we use MSBuild to flatten the structure and then TeamCity to archive it. It would be nice to skip the MSBuild part.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:41:44+00:00Added an answer on May 15, 2026 at 10:41 pm

    From the TeamCity 2019.1 Documentation :

    The files will be published preserving the structure of the directories matched by the wildcard (directories matched by “static” text will not be created). That is, TeamCity will create directories starting from the first occurrence of the wildcard in the pattern.

    and

    The optional part starting with the => symbols and followed by the target directory name can be used to publish the files into the specified target directory. If the target directory is omitted, the files are published in the root of the build artifacts. You can use “.” (dot) as a reference to the build checkout directory.
    The target paths cannot be absolute. Non-relative paths will produce errors during the build.

    Two key points here:

    1. If you use a wildcard in the source specifier TeamCity will preserve the directory structure from the first wildcard in the specification. Using your examples SomeLibrary\bin\Release\*.dll does not preserve the directory structure because the lone wildcard only specifies files while **\bin\Release\*.dll will preserve the directory structure because of the first wildcard that will match directories
    2. If you omit the target directory (just use =>) any found artifacts, with preserved directory structures, will be placed at the root of the artifacts tree. Using your example SomeLibrary\bin\Release\*.dll => will place SomeLibrary.dll and SomeDependency.dll at the root of the artifacts tree while **\bin\Release\*.dll => will place the two files in the folder SomeLibrary\bin\Release under the root of the artifacts tree.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a msbuild script that builds multiple projects using TeamCity. It builds a
We are using TeamCity 6.0.2 and have a build configuration that runs SoapUI tests.
I am using the TeamCity Visual Studio runner. I want to add a setting
I have a C++ Builder 2010 project that's being built using TeamCity . I
How to increment the Assembly version on each build in TeamCity using Build Runner
I am having problems running Nunit tests from teamcity using Nunit build runner. Until
We have an existing MVC application that we're building using TeamCity and things were
I have created a release configuration project in Teamcity 6.5 using the SLN Runner
I am using TeamCity as my CI server. I have defined three Build Steps.
We're using TeamCity's command line build runner to call a bat-file. The bat-file builds

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.