By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,336 Members | 1,293 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,336 IT Pros & Developers. It's quick & easy.

Copying application folders

P: n/a
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.
Feb 6 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
On 6 feb, 02:33, Frank Rizzo <n...@none.comwrote:
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

Feb 6 '07 #2

P: n/a
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
Feb 6 '07 #3

P: n/a
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.

Horacio Nuñez Hernández wrote:
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
Feb 6 '07 #4

P: n/a
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/subscripti...ult.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/subscripti...t/default.aspx.
==================================================

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

Feb 6 '07 #5

P: n/a
Linda Liu [MSFT] wrote:
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

>
Hope this helps.
Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.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/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Feb 6 '07 #6

P: n/a
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

Feb 7 '07 #7

P: n/a
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

Feb 9 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.