views:

28

answers:

2

Hi, Say I had (foolishly) setup a Silverlight project in VS and failed to setup a supporting website at time of instantiation are there any steps I can take to add one retrospectively?

Many thanks.

A: 

The simplest solution might be to create a new solution with the supporting website project and copy your Silverlight project into that and carry on working in the new solution.

You could also copy the web project to your existing solution. In that case you'll need to change the name of the referenced .xap file.

ChrisF
this is a good solution
simonjohnroberts
A: 

Do the following:-

  1. Add a new Web Application or Web Site to the existing solution.
  2. Open the properties of the new Web Application, on the Silverlight tab select Add..., select the existing SL project in the project drop-down (already selected by default), Click Add.
  3. Set the web app to be the startup project
  4. Select the newly created test .aspx page that will have been created for you as the start page.

Now you are where you would have been had you opted to create the test web app when creating the solution.

AnthonyWJones
Excellent solution, many thanks chaps
simonjohnroberts