Support configuration specific output folders in a Silverlight project

Support configuration specific output folders in a Silverlight project

  • Comments 5

In Beta1, VS Silverlight tools doesn’t allow users to maintain separate build output folder for different build configuration, and this causes once you switch from “Debug” to “Release” build configuration, under ClientBin folder the existing debug assemblies will be overwritten by the release version. Unless you switch back to “Debug” configuration, you can’t get the debug version back. This also impacts the .xap files copied to the ClientBin folder at the hosting web project.

In Beta2, we have made several changes to improve the experiences

1. At Silverlight project side, we don’t use the “ClientBin” folder anymore; rather, we bring back the old one of “Bin” coming with regular client projects

2. Underneath it, each build configuration will have its own subfolder called “Debug”, “Release”, etc.

clip_image002[1]

3. At a web project’s side, underneath the “ClientBin” folder, there is a subfolder created for a specific build configuration. The .xap file gets copied to there

clip_image004[1]

4. You can feel free to switch among different build configurations. VS build will pick up the current active configuration and builds the project and copies to the hosting web project. If you use msbuild, you can pass in the preferred configuration through the command line.

Several UI elements were also adjusted accordingly

1. In the “Add Silverlight Application” wizard, you have a checkbox to enable this. If you turn it off, you will get beta1 behavior

clip_image006[1]

2. If you have already added a Silverlight application into a web project, you will have UI option in the property page dialog to enable this (click the “Change…” button)

clip_image008[1]

3. Now you are having a VS project which is configuration folder aware.

Page 1 of 1 (5 items)