views:

160

answers:

2

We're using Rake with Albacore for our build & deploy process in TeamCity but my latest solution is causing me problems when I compile.

When I run msbuild I get the following error:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets(60,3): error MSB3021: Unable to copy file "bin\admin.web.dll" to "C:/src/Trunk/admin/output/_PublishedWebsites\web\bin\admin.web.dll". Could not find file 'bin\admin.web. dll'.

The build output path for the website project is set to bin\ in VS & when I build through VS it copies them into there fine. But building through Rake & MSBuild doesn't work.

My compilation ruby file has the :outdir set to "output/_PublishedWebsites" and it copies fine for all my other solutions.

It's an edge case but it's causing me pain - anybody got any ideas?

+1  A: 

whats the full msbuild command that gets executed?

Edit pretty sure its a path issue. I use

/p:WebProjectOutputDir: /output
/p:OutDir: /output/bin

If you post the ms build command, or at least the albacore config it would be much easier to help ;)

What project are you building? what dependencies does it have?

Andrew Bullock
James Hollingworth
here's the config for our msbuild tasks http://gist.github.com/560503
James Hollingworth
+1  A: 

Thanks for everyone's help but it isn't anything specific to MSBuild commands, it's to do with how the project files lock dlls.

The solution I was building had 3 web projects in it & one of them had the bin directory included in the solution in VS.

All I needed to do ws exclude from the solution & the build & publish works fine - no more locking.

Paul Harrington
glad to hear you figured it out. :)
Derick Bailey