I build extensions for a 3rd party application. We do not have access to the source code. Visual studio has a post build command to copy files to said program’s assembly directory.
copy $(TargetDir)$(TargetName).pdb "$(ProgramDropDir)"
copy $(TargetDir)$(TargetName).dll "$(ProgramDropDir)"
When the program launches it loads the assemblies (actually they are loaded when required, I think this is because of JIT compilation). Our application consists of 49 assemblies. Deploying them all is quite slow. I can get around the slow build by building at the project level. This builds only referenced assemblies. That’s still problematic 95% of the time. Usually, only 1 assembly has actually changed…yet all are copied.
How can this process be improved? Ideally…
A. Deploy assemblies only when they changed.
B. Build only when a project file has changed.
C. copy only when I plan to run the main application. E.G. Do not copy when running a unit test.
D. The build fails when the 3rd party app is running. I have to close the app. Which means I have to re-login to the app and wait for it to load (its a slow loading beast).
I own TFS2010. If absolutely necessary, I am open to new tools.
A. You can use RoboCopy to do this. By default, RoboCopy will only copy a file if the source and destination have different timestamps or different file sizes.
You can also use RoboCopy task in MSBuild Extension Pack if you want to do it with MSBuild.
B. If you are using a CI server you can use poll SCM mechanism that starts a build whenever a change is made in SCM.
I am not sure what you mean with the last one. No builds are triggered when you ‘run’ the application or some unit test.