I am developing a Sketchflow (Silverlight) project in Expression Blend 3. It has been working fine up until today, now I cannot run the project. Specifically in the Project menu the "Run Project" option is now greyed out (all the other options are fine). F5 als开发者_运维百科o doesn't have any effect.
I've obviously messed up the code somewhere but I can't find any information on what could cause the "Run Project" option to be disabled. This would obviously help the troubleshooting. Does anybody know what controls this functionality?
I can build the project no problem. And if I package the project (so it runs outside Expression) this also works fine. It is just launching it from Expression that doesn't work.
Right-click on the project (in the project pane) and verify that "Startup Project" is checked. I had obviously accidentally unchecked it at some point.
Usually when you create new Silverlight solution Blend or VS would create a solution with two projects in it. One would be called something like MyProject
and another would be called smth. like MyProjectScreens
.
The MyProjects
doesn't contain much of Silverlight code, it's rather meant to be just "wrapper" (or in other words "it contains bootstrapping code for your actual SL screens") with Default.html
and Default.aspx
and App.xaml
. And MyProject
is the startup project.
The MyProjectScreens
project in turn - is your actual SL project. (And it is NOT startup project).
THE SOLUTION TO OP'S PROBLEM, Maybe Blend somehow messed up solution configuration files (even though VS was fine with them) and my MyProject
project has disappeared from the solution explorer. All you have to do is to right click on solution, click "Add Existing Project" and navigate to my solutions folder and choose the project file. (Yeah and also make sure that when MyProject
is added it is marked as "Startup Project" (as @Hugh mentions).
HTH
精彩评论