Copying application folders

F

Frank Rizzo

I have a bunch of projects in my solution with a typical dependency
structure. A class library project (lets call it "X1") at the bottom of
the dependency tree has a folder with a bunch of files that are set to
be copied to the Output directory on compile.

The problem that I am running into is that as the projects, that have a
dependency of project X1, are compiled, the X1.dll is copied into the
bin directories of those projects. However, the folders of project X1
are not copied.

Is there anything I can do to make sure that the folder in project X1 is
copied to the top of the tree as the solution compiles?

Thanks.
 
?

=?iso-8859-1?q?Horacio_Nu=F1ez_Hern=E1ndez?=

I have a bunch of projects in my solution with a typical dependency
structure. A class library project (lets call it "X1") at the bottom of
the dependency tree has a folder with a bunch of files that are set to
be copied to the Output directory on compile.

The problem that I am running into is that as the projects, that have a
dependency of project X1, are compiled, the X1.dll is copied into the
bin directories of those projects. However, the folders of project X1
are not copied.

Is there anything I can do to make sure that the folder in project X1 is
copied to the top of the tree as the solution compiles?

Thanks.

You could use the Post Compilation events, check in the Project for
this options
something like this

XCOPY /D /Y /R "$(TargetPath)" "C:\Archivos de programa\Windows Live
Writer\Plugins\"
C:\Archivos de Programa\Windows Live Writer\WindowsLiveWriter.exe

Here I said to the VS: copy the C:\Archivos de programa\Windows Live
Writer\Plugins\"
C:\Archivos de Programa\Windows Live Writer\WindowsLiveWriter.exe
into $(TargetPath)

where $(TargetPath) = the place where the exe is located
 
?

=?iso-8859-1?q?Horacio_Nu=F1ez_Hern=E1ndez?=

Sorry, the correct post:

You could use the Post Compilation events, check in the Project for
this options
something like this

XCOPY /D /Y /R "$(TargetPath)" "C:\Archivos de programa\Windows Live
Writer\Plugins\"


Here I said to the VS: copy the $(TargetPath) to C:\Archivos de
programa\Windows Live Writer\Plugins\"


where $(TargetPath) = the files that you just compile
 
F

Frank Rizzo

Horacio, your solution won't really work. There are multiple developers
with multiple tester projects (that are at the top of the dependency
tree). If I set it up on my pc, it would not even compile on another
developer's.
 
L

Linda Liu [MSFT]

Hi Frank,

I have performed a test on the hnh12358's suggestion and confirmed it
works.

I also find that if I add a reference to the ClassLibrary project, rather
than just the assembly file in the Windows application project, the files
in the ClassLibrary project are copied automatically to the output
directory of the Windows application project when the solution is built.

You may try my suggestion to see if it solves the problem.

Hope this helps.


Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
F

Frank Rizzo

Linda said:
Hi Frank,

I have performed a test on the hnh12358's suggestion and confirmed it
works.

I also find that if I add a reference to the ClassLibrary project, rather
than just the assembly file in the Windows application project, the files
in the ClassLibrary project are copied automatically to the output
directory of the Windows application project when the solution is built.
You may try my suggestion to see if it solves the problem.


Linda, all refs are to projects, not assemblies. But try the following.

Project A (Windows Application) depends on
Project B (Class Library) depends on
Project C (Class Library) - this one has the folder.


Does the folder from Project C get copied to Project A's output directory?

Regards
 
L

Linda Liu [MSFT]

Hi Frank,

Thank you for your prompt response.

In my test, there're only two projects, say Project A and Project B.
Project A has a reference to Project B. When the solution is built, the
files in the Project B are copied to the output directory of Project A.

I performed a test on three projects and did see that the files in the
Project C aren't copied to the output directory of Project A.

I still suggest that you adopt the method that Horacio suggested, but with
a little changes. You may write the command line to copy the files in the
post-build event of the tester projects that are at the top of the
dependency tree, instead of the referenced class library project. I think
it may be more reasonable.

Hope this helps.
If you have any concerns, please feel free to let me know.


Sincerely,
Linda Liu
Microsoft Online Community Support
 
L

Linda Liu [MSFT]

Hi Frank,

How about the problem now?

If the problem is still not solved and you need our further assistance,
please feel free to let me know.

Thank you for using our MSDN Managed Newsgroup Support Service!


Sincerely,
Linda Liu
Microsoft Online Community Support
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top