Last post Oct 08, 2012 05:44 AM by Pankaj.Sharma
Oct 05, 2012 03:28 AM|mou_inn|LINK
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 setup/deployment projects. 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 post it to another forum too and some one told me below this
Open or create a setup/deployment project in Visual Studio 2005
Press F4 to display the Properties window
Click on the name of your setup/deployment project in the Solution Explorer
Click on the PostBuildEvent item in the Properties window to cause a button labeled "..." to appear
Click on the "..." button to display the Post-build Event Command Line dialog
Add a command line of your choice in the Post-build event command line text box
Build your project in Visual Studio and verify that the post-build event is executed after the main MSI build
so it is ok but what i need to write for copying files from one location to another location that is not clear to me. so now this is most important for me what to write for copying file during setup generation.
i got another clue like below one. 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"
the above statement or line is not clear to me. what i need to write in my case? so need step-by-step guide.
Oct 05, 2012 05:03 AM|Pankaj.Sharma|LINK
I have a similiar kind of post build event where i copy files from one project location to another. You may specify a command like this
Copy /Y "$(ProjectDir)Report\*.*" "$(ProjectDir)SetupProject\SSRS_Reports\*.*"
$(ProjectDir) is a macro that is defined by the VS itself you may have other macros defined in the post build events tab of Project properties window. Even you can use hardcoded path for the same.
For the online reference of all command check the link http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true.
Hope this helps!!
Oct 08, 2012 03:37 AM|mou_inn|LINK
thanks for answer. you gave script like
Copy /Y "$(ProjectDir)Report\*.*" "$(ProjectDir)SetupProject\SSRS_Reports\*.*" what this script does. what it will copy and from
where to which location.
here u specify like $(ProjectDir)Report\but here u did not specify project name
"$(ProjectDir)SetupProject\SSRS_Reports here u specify setup project name like SetupProjectwhy so difference? can u please discuss once again. thanks
Oct 08, 2012 05:44 AM|Pankaj.Sharma|LINK
As i mentioned that $(ProjectDir) is a macro in Visual Studio. A Macro means that Visual Studio automatically determines which project it is currently referring to. So a projet P1 is open in VS.NET. it will refer to P1's base dir.
If project P2 is opened with VS.NET then it will refer to base path of project P2.
I added SetupProject because i assume you have a sub project in the solution with this name. that means this project exists with the $(ProjectDir). Although you are free to use any hard coded path.