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 7072013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:45:25+00:00 2026-05-28T05:45:25+00:00

Possible Duplicate: Copy to Output Directory copies folder structure but only want to copy

  • 0

Possible Duplicate:
Copy to Output Directory copies folder structure but only want to copy files

In my project I’ve created a folder to host com dlls.
I add a link reference to them as they sit out of my project and in some directory of the solution.
I’ve updated their CopyToDirectory property to ‘Copy always’.

The files are copied successfully on every build, yet they are situated inside a sub folder.
For example, for this command in the csproj:

com\libeay32.dll
Always

I get a sub directory inside my debug folder called com, with the dll inside it. I don’t want the sub directory. I cannot use any post or pre build commands (I am hosting my file on cloud and these commands don’t get processed)

  • 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-28T05:45:25+00:00Added an answer on May 28, 2026 at 5:45 am

    I cannot use any post or pre build commands (I am hosting my file on cloud and these commands don’t get processed)

    Note: Regarding your question, I assume the build process is performed “in the cloud” and that the pre/post build events don’t get fired or are blocked (If this is not the case, please correct me I’ll try and update my answer accordingly).

    How about leveraging the AfterBuild target with a Copy task in your .csproj file?

    <Target Name="AfterBuild">
      <ItemGroup>
        <NativeBinaries Include="$(MSBuildProjectDirectory)\com\*.dll" />
      </ItemGroup>
      <Copy SourceFiles="@(NativeBinaries)" DestinationFiles="@(NativeBinaries->'$(OutputPath)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
    </Target>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Copy to Output Directory copies folder structure but only want to copy
Possible Duplicate: Git - Whitelisting files in a complex directory structure I have a
Possible Duplicate: Best way to copy the entire contents of a directory in C#
Possible Duplicate: Visual Studio Post Build Event - Copy to Relative Directory Location i
Possible Duplicate: How does Copy-local work? I have following situation: there's a project named
Possible Duplicate: Copy to clipboard without Flash I want to copy some text from
Possible Duplicate: Why has the destructor been called only once? Given the code below,
Possible Duplicate: How to copy part of an array to another array in C#
Possible Duplicate: How disable Copy, Cut, Select, Select All in UITextView I have some
Possible Duplicate: question about copy constructor if I have this snippet of the code

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.