views:

2448

answers:

2

We're developing a ASP.Net Web Application project that has a Silverlight 2.0 component. We've referenced the silverlight project in the web application properties, and the xap file is being copied to the ClientBin folder of the Web application when we build locally.

The problem is that when we build this on our build server (which is using CruiseControl.Net, though I don't think that's relevant) the xap file isn't being copied. The strange thing is that this was working, but something has broken it and we can't figure out what.

Anybody seen this before?

A: 

I just had a similar issue where some files weren't being built/moved to my dev server. The issue ended up being permission as I manually deleted a folder. For some reason, the Network Service account and permissions weren't being inherited by the newly recreated folder.

Jeremy Sullivan
+10  A: 

Sorted!

Not quite sure why, but it turns out we had an out-of-date version of Microsoft.WebApplications.targets on the build server - the version we had didn't have the CopySilverlightApplications task in it. To fix the problem, I copied the two files from the C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications folder to the same location on the build server. Now everything works as it should.

Now if only I could find out which installer should have updated those files...

Samuel Jack
The same has happened for me. This is with VS2008SP1 and I used the Web Platform installer to download and install "Silverlight 3 Tools for Visual Studio", "Silverlight Toolkit (october)" and "WCF Ria Services". For some reason, this worked well on one machine and failed on another. The exact same procedure. There were slight differences in the existing configuration, so I think one of those differences broke the installer.Anyway, thanks for updating with your success.
Jørn Jensen
The two files that need to be copied are "Microsoft.WebApplication.Build.Tasks.Dll" and "Microsoft.WebApplications.targets".These files are added by the Visual Studio 2008 Web Deployment extensions installer. Copying them manually to the build server is a hack necessary (I think) because this installer won't run unless VS 2008 is installed and few people want the IDE installed on their build server.
Ashley Tate