Reputation: 7253
We have a semi-complex Visual Studio solution that has a Silverlight 4 front end, CSLA 4.1 for the business entities, and using the CSLA WCF data portal. Because of using CSLA for the serialization across the wire, we have to have our Silverlight business assemblies the same name as our server side business assemblies. The problem comes when trying to build our Web application due to conflicting assembly names. Compiling on a developer's box works fine since Visual Studio is doing it's own magic to avoid conflicts at the solution level, but having separate builds for the Web Application and the Silverlight projects on the build server is causing issues due to the Web Application referencing the Silverlight projects in the .csproj. Due to that, when we have TFS perform a build against the Web Application it will attempt to compile the Silver projects and update the XAPs. We have that being done as a separate build so we don't care about that.
Is it possible to set up the .csproj build a Web Application on a developer's machine with the Silverlight references building, but having them ignored on the build server? Ideally it would involve not relying on our own custom MSBuild properties being thrown at the build in TFS. As a last resort we could stop relying on the .csproj build scripts and create our own MSBuild file, but we don't have the time allocated for that just yet.
Upvotes: 0
Views: 713
Reputation: 7253
The solution I ended up taking was modifying the Web Application .csproj so that the line
<SilverlightApplicationList>...</SilverlightApplicationList>
had a conditional of the following
<SilverlightApplicationList Condition="'$(SilverlightApplicationList)' == ''">...</SilverlightApplicationList>
Then in build definition for the project, under Process -> MSBuild Arguments I added
/p:SilverlightApplicationList=" "
So now developers can build locally and the build process can build just the Web Application without the Silverlight projects.
Upvotes: 2