views:

57

answers:

3

If I need to build a silverlight application and have it work under my asp.net application!

Does that mean I have to create two different vs projects?

One for silverlight the other my asp.net application? Or I can have one in 1? What do I do?

Sorry if this is a silly question..

Thanks

+2  A: 

Yes, you need a separate project for the Silverlight app. At least in VS2010, you can go to ASP.NET's project's properties, Silverlight Applications tab, and select "Add..." to add a Silverlight project with all the plumbing hooked up.

Matt Greer
So I create asp.net app first then I open it and add the silverlight app to the solution tree? Is that correct? Thanks
K001
No go to your web app's properties, and then the Silverlight Application tab
Matt Greer
A: 

the silverlight app is technically a class library project. So a separate project would be required.

nitroxn
Well the Silverlight app uses its own CLR and BCL, so it really has to be a different project.
Matt Greer
+2  A: 

You will need to create a separate project for the Silverlight code. But, you will be able to incorporate that application into an existing ASP.Net project. You will want them both in the same solution, of course.

In the project properties of the Silverlight project there is an option to choose the ASP.Net project to incorporate the Silverlight app into. That's why you want them in the same solution.

Chazmanian
How do I do it extactly? I have my asp.net solution open now how do I add the silverlight solution to it so it becomes 1 solution? Thanks!
K001
As mentioned by Matt, you would use the project properties of the ASP.Net project to point to the Silverlight project in the same solution.
Chazmanian