Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, October 2, 2012 4:56 PM
my solution has two project. one is my actual project and another one is setup project. my actual project has one report folder where i store my all ssrs report.i have one folder in setup project called "SSRS_Repor". now i want that when i will do batch build then setup for my project regenerate and then i want to copy all files from report folder of my actual project to SSRS_Repor in my setup project. if i can do this kind of automation of copying files from one location to another folder of my setup project then i could be get rid of manual copying of rdls files. i hard this is possible by pre build event of setup file generation. i search google for this for details step-by-step instruction but got no good link. so please guide me how can i do it. i know this can be done like writing script for setup Pre/Post Build Event but not aware properly. i got a sample like
copy /Y "$(TargetDir)$(ProjectName).dll" "$(SolutionDir)lib\$(ProjectName).dll"
but not clear where to set it. so need step-by-step guide.
it will be helpful if some one tell me all the steps in detail. thanks
All replies (8)
Tuesday, October 2, 2012 7:30 PM | 1 vote
Please look into this if it is helpful for you:
http://blogs.msdn.com/b/astebner/archive/2006/08/24/716145.aspx
Thursday, October 4, 2012 12:53 PM
very honestly speaking i need the statement what i need to write for copying files from one location to another location during setup generation. suppose i need to copy all rdls files from report folder of my project solution to another folder called report to setup solution. just give me sample script.
here i got sample script which is not clear to me
copy /Y "$(TargetDir)$(ProjectName).dll" "$(SolutionDir)lib\$(ProjectName).dll"what is TargetDir ? the above script is not clear to me. can u help me to understand. thanks
Thursday, October 4, 2012 2:03 PM
It is not possible to help you with the exact line as you want without knowing your folder structure, file names, what do you want to copy actually, etc.
But, I can definitely help you if you want to learn what is $TargetDir, $ProjectName, $SolutionDir and $ProjectName. These are kind of macros to help us, programmers to write common scripts. It helps when moving the project across different folders also because these macros expand to the relative paths during the build process automatically.
The list of all possible such macros are available here. Hope you can understand it easily now.
Now, it is up to you to combine this flexibility along with powerful DOS commands inside your Pre/Post build tasks.
All the best!
Saturday, October 6, 2012 5:04 PM
here you will see my main project has report folder and setup project has also report folder and i want to copy all rdlc files from report folder of my main project to report folder of setup project. so now give a right script which will do that. thanks
Saturday, October 6, 2012 6:49 PM
Did you really read the pages containing descriptions for build-time macros? If so, do you still really need help from the community?
Don't you think it is a matter of just understanding the relative paths and working with the DOS Copy command now?
If you really don't have time to do this simple investigation yourself, is it good to expect the help from the community? Why do you want the community to give you the exact command line? Just to copy it and paste it in your project?
I don't think this community will encourage such things. In my understanding, this community is for helping the people by providing the directions thus encouraging the people to learn and sustain, not for doing the entire work for them.
Sunday, October 7, 2012 5:53 PM
why r u getting so serious. i am asking for one line of script. if u know then share with me...that is it.
Monday, October 8, 2012 8:02 AM | 1 vote
Normally, I don't want to respond to such questions.
Believe me, everyone in the community expects the original poster to do some enough research from his/her side when facing some problems. When the research fails and he/she couldn't proceed because of some peculiar problems, the community is willing to offer help. Remember that everyone expects the original poster to do the trivial jobs on own. Such expectation is good and healthy for the community.
You can see how much helpful information we have provided for your question. They are all direct information. Now, it is just the matter of reading and customizing it just for your project needs. Nothing more.
I admit that it is just one line script. If it is so, we will expect you to write it, right?
I am rephrasing it: It is better to teach a person how to fish instead of giving him/her fish directly.
This is the reason I feel awful on seeing your request for that one line. I hope you will be positive and will complete your work because you have got enough references already to learn for solving your problem. All the best!
Final note: Please read this - Rubber Duck Problem Solving - to understand what do I mean. Have a rubber duck near you handy always.
Saturday, December 8, 2018 3:48 PM
Great answer to the all the lazy programmer wannabies. Did they ever hear the story about teaching a man to fish? To all the lazy wannabies...The world has already left you behind.