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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:29:59+00:00 2026-05-11T17:29:59+00:00

For some reason, we have a script that creates batch files to XCOPY our

  • 0

For some reason, we have a script that creates batch files to XCOPY our compiled assemblies, config files, and various other files to a network share for our beta testers. We do have an installer, but some don’t have the permissions required to run the installer, or they’re running over Citrix.

If you vomited all over your desk at the mentions of XCOPY and Citrix, use it as an excuse to go home early. You’re welcome.

The code currently has hundreds of lines like:

CreateScripts(basePath, "Client", outputDir, FileType.EXE | FileType.DLL | FileType.XML | FileType.CONFIG);

It used to be worse, with 20 int parameters (one per file type) representing whether or not to copy that file type to the output directory.

These hundreds of lines create upload/download batch files with thousands of XCOPY lines. In our setup projects, we can reference things like “Primary output from Client” and “Content Files from Client”. I’d love to be able to do that programmatically from a non-setup project, but I’m at a loss.

Obviously MS does it, either using an API or by parsing the .csproj files. How would I go about doing this? I’m just looking for a way to get a list of files for any of the setup categories, i.e.:

  • Primary Output
  • Localized Resources
  • Content Files
  • Documentation Files

EDIT:
I have a setup project like Hath suggested, and it’s halfway to what I’m looking for. The only problem keeping that from being a perfect solution is that multiple projects depend on the same assemblies being in their own folder, and the setup will only copy the file once.

Example:

Projects Admin, Client, and Server all rely on ExceptionHandler.dll, and Admin and Client both rely on Util.dll, while Server does not. This is what I’m looking for:

  • Admin
    • Admin.exe
    • Admin.exe.config
    • ExceptionHandler.dll
    • Util.dll
  • Client
    • Client.exe
    • Client.exe.config
    • ExceptionHandler.dll
    • Util.dll
  • Server
    • Server.exe
    • Server.exe.config
    • ExceptionHandler.dll

Since the referenced assemblies are all the same, what I get is this:

  • Admin
    • Admin.exe
    • Admin.exe.config
    • ExceptionHandler.dll
    • Util.dll
  • Client
    • Client.exe
    • Client.exe.config
  • Server
    • Server.exe
    • Server.exe.config

This causes a FileNotFoundException when either Client or Server can’t find one of the two DLLs it’s expecting.

Is there a setup property I’m missing to make it always copy the output, even if it’s duplicated elsewhere in another project’s output?

EDIT AGAIN: All referenced DLLs are set to “Copy Local”, and always have been. I found a decent article on using NAnt and XSLT to grab the list of files, so that may be a possible solution as well, as neouser99 suggested.

ACCEPTED SOLUTION: I’m pretty much back where I started. All .exe and .dll outputs are put into a “bin” directory in the setup project, loosely packed. The other per-application folders contain shortcuts to the executable in that directory.

The difference now is, I’m going to add a custom action to the installer to use reflection, enumerate the dependencies for each executable output, and copy the .exe and .dll files to the separate directories. Bit of a pain, as I just assumed there was a way to programmatically detect what files would be included via some setup library.

  • 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-11T17:29:59+00:00Added an answer on May 11, 2026 at 5:29 pm

    why not use another setup project and just set the ‘Package files’ setting to As Loose uncompressed files (setup project->properties)? then share the folder.. or something.

    edit:

    I see, you have 3 folders for your outputs. but the setup project only detects the ExceptionHandler.dll and Util.dll once, so it will just pick the first folder and put it in there.

    You could do a setup project for each project – bit annoying maybe..

    You could manually add in the dll’s to the projects that are missing the assembly’s
    either by adding in the File by ‘add file’ or ‘add assembly’ or ‘add project output’ if you have those projects in the same solution.. (I doubt that’s the case though).

    or just dump all of them into one output directory…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 100k
  • Answers 100k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Create View Model: public class UserViewModel { public myApplication.Models.User User;… May 11, 2026 at 7:59 pm
  • Editorial Team
    Editorial Team added an answer C# only has literal true and false values. C# requires… May 11, 2026 at 7:59 pm
  • Editorial Team
    Editorial Team added an answer If you are writing xml, I wonder whether xml serializer… May 11, 2026 at 7:59 pm

Related Questions

We have a project where a vendor produces some custom code for us and
I have an assortment of database objects (tables, functions, views, stored procedures) each scripted
I need to create an RPM package from an ANT script that runs on
Our clients use SQLServer/Oracle databases. Over the years, we've sent them many update scripts
I have an img tag in my webapp that uses the onload handler to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.