MINI SUPPORTERS:

 

 

Silverlight XAPs and Web Sites - Page 3
       by kirupa  |  16 April 2008

In the previous page, you learned how to create a new Silverlight project and link a Web site to its output. In this page, let's look at the other case where you already have a Silverlight project created but don't have a Web site associated with it.

Adding a Web Site to Existing Silverlight Project
You may be wondering how you could get into a situation where you have a Silverlight project but no Web site project. It's actually quite common. Currently, in the beta version of Blend 2.5, if you happen to create a new Silverlight project, you create just a Silverlight project. You don't get the option of having a Web site created as well.

Fortunately, the fix for this is quite simple. Open your Silverlight project in Visual Studio. Look in your Solution Explorer where you only see your single Silverlight project:

[ the Solution Explorer is your friend ]

Right click on your Solution and go to Add | New Web Site:

[ you can easily add a new Web site project to an existing solution ]

The Add New Web Site window will appear. You will see several preconfigured Web site templates for you to pick from. Let's keep it simple and just go with the Empty Web Site:

[ select the Empty Web Site template ]

Once you select your Empty Web Site template and hit OK. Your Add New Web Site window will close, and you will see your Web site project appear in your Solution Explorer. Since it is after all an empty Web site, you won't see much.

Anyway, right click on your web site project in the Solution Explorer, and from the menu that appears, select the Start Options item:

[ to associate your Silverlight app during startup with your web site, go to Start Options ]

A properties window will appear. From this window, click on the Silverlight Applications menu item:

[ select the Silverlight Applications tab ]

Once you have clicked on Silverlight Applications, you will probably a lot of empty space on the right-half of this window. At the bottom, though, you will see three buttons of which only one is enabled - Add. Click on this Add button:

[ Add a new Silverlight Application reference ]

Once you have clicked on Add, you will see the Add Silverlight Application dialog appear:

[ create a new SL project or link to an existing SL project form this page ]

From this window, you can either select an existing Silverlight Application (which is what you would probably want to do), or you can create a Silverlight project and have it be linked to your web site instead.

In either case, now, you are at exactly where we were in the previous page where your solution now contains both a Silverlight project as well as a Web Site project that listens to the output produced by your Silverlight project. Yay!


Need Help?

If you have questions, need some assistance on this topic, or just want to chat - please drop by our friendly forums and post your question. There are a lot of knowledgeable and witty people who would be happy to help you out. Plus, we have a large collection of smileys you can use

Share

Did you enjoy reading this and found it useful? If so, please share it with your friends:

If you didn't like it, I always like to hear how I can do better next time. Please feel free to contact me directly at kirupa[at]kirupa.com.

Cheers!

Kirupa Chinnathambi
about | facebook | twitter

 

1 | 2 | 3

SUPPORTERS:

cloud storage
cloud storage
kirupa.com's fast and reliable hosting provided by Media Temple. Creative web apps. Make your own free flash banners and photo slideshows.
HTML5 CSS3 Mobile Gallery for iPhone, iPad Flash effects. Art without coding.
Flipping Book - page flip flash component. Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery
X-Platform Application Development for Flash Free Flash Components Download - XML Templates, Players and Galleries.

two computer monitors

US Direct

Learn how to advertise on kirupa.com  
 
SHARE:



MINI SUPPORTERS: