views:

239

answers:

2

For the warehouse work under progress, we have a single solution with multiple projects in it

  1. OLTP Database Project
  2. Warehouse Database Project
  3. SSIS ETL project

After the SSIS project is built, I want to move the binaries (XML, really) from the Bin folder to "C:\AutomatedTasks\ETL.Warehouse\" and "C:\AutomatedTasks\ETL"

I cannot find the Post-Build events to do that for the SSIS project. Where are they? If they aren't available, how do I achieve this?

A: 

When you specify pre- and post-build events via VS IDE, VS adds two MSBuild properties to the underlying project file: PreBuildEvent and PostBuildEvent. I don't know much about how SSIS projects get built but you can try to manually edit the project file and add those properties along with the commands you need:

<PropertyGroup>
  <PostBuildEvent>copy "$(TargetDir)someoutput.xml" "C:\AutomatedTasks\ETL\someoutput.xml"</PostBuildEvent> 
</PropertyGroup>

You can also take a look at some of the other VS macros to see if they already capture what you need. For example, you may be able to use $(TargetPath) and $(TargetFileName) instead of hardcoding someoutput.xml if someoutput.xml is the target output.

copy "$(TargetPath)" "C:\AutomatedTasks\ETL\$(TargetFileName)"
Mehmet Aras
this works with database projects, but not with SSIS projects.
Raj More
A: 

I tried the solution above, with quotes and without quotes.

<PropertyGroup>
  <PreBuildEvent>copy $(SolutionDir)eCarelogicCommonControls\UserControls\*.ascx $(SolutionDir)eCareLogicCore\UserControls\ </PreBuildEvent> 
</PropertyGroup>

I am getting the following error, any idea what might be the issue?

Error 6 The command "copy D:\ecarelogic_1110\eCareLogicCore\eCarelogicCommonControls\UserControls\*.ascx D:\ecarelogic_1110\eCareLogicCore\eCareLogicCore\UserControls\ " exited with code 1. eCareLogicCore

nilesh