开发者

VS.NET solution built differently on build server

I have a VS.NET solution with two Projects, ProjectWeb and ProjectLibrary. PW depends on PL, so I have a VS.NET project reference to PL in PW.

That works all well and good on my dev box, but when it all gets to the build server, I have two different build projects, one for PL and one for PW. I'd like to build PL and copy the binaries somewhere. Then, I'd like to build PW and it only, using the binaries from the previous PL build.

But will that work since the PW VS.NET project is referencing 开发者_如何学Ca project that doesn't exist when I build PW only on the build server?

How can I set this up

For specifics, I am using CC.NET and NAnt, but I have other projects that use Hudson and straight MS build


one approach I have used in the past is to have a postBuild event on the PL project which copies your dll to LocationX (something like this)

XCOPY $(TargetFileName) LocationX /R /Y

(the /R /Y is needed to force an ovewrite of the file which is usually required if the dll is stored in source control and is readonly...otherwise not really needed).

Then in PW do not use a project reference, reference the dll in LocationX instead. Then all will work on your machine and on the build box.

You can still include PL in your solution so debugging should still work fine.

Note that using the PostBuild event is a bit of an 'old' way of doing it, you're better off creating an AfterBuild MsBuild target which does the xcopy work. Same result though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜