How to set the startup project in Expression Blend 2 - expression-blend

Does any one know how to set the startup project in Expression Blend 2? I have a solution which builds 2 executable files. I've set the Startup Project to the one I want to debug in Visual Studio and when I run it from VS that project launches no problem. However if I open the solution in Blend and press F5 to run it the other project always launches.
There doesn't seem to be a way of setting the Startup project in Blend, and it does seem to respect the setting in Visual Studio. Or am I missing something?
Why does Blend always launch the other project and is there anyway I can change this?
Thanks
Kaneda

In the project explorer (Blend), right-click the project name within the solution and make sure 'Startup Project' is checked.
I've only got Blend 3 RC to check on at the moment but I'm pretty sure this was also in Blend 2.

Ok, I see. Turns out that the feature was added with SP1 and I didn't have that installed. Installed that, now my solution launches properly

Related

Unable to run multiple startup projects in Visual Studio 2015

I'm using VS 2015 Enterprise Update 1, although this happened before update 1 as well.
At some point, I became unable to do CTRL+F5 (Start without Debugging) when my solution is configured with multiple startup projects. It doesn't matter what these projects are - in fact, I can have a single project selected in the multi-project dialog, and I get the same error.
The error is:
Unable to start without debugging. The startup project cannot be
launched. Ensure that the correct project is set as the startup
project. The startup project can be changed by selecting the 'Set as
Startup Project' command from the right click menu in Solution
Explorer.
Additionally make sure its debug settings are correctly configured in
project properties.
I've confirmed that I can CTRL+F5 with individual projects, but never with multiple. This happens across multiple, totally independent solutions - and so appears to be some non-solution/project specific issue with Visual Studio.
I also tried running Visual Studio in Safe Mode and that made no difference.
I've just had the exact same thing and it turned out to be because I'd set every project to "Start without debugging". Seems that at least one project is required to to be set to just "Start" before it will run anything..

Why is one project in my solution bold

In my solution, I have one project whose name is bold.
Why is ErrorHandlerLibrary bold?
This is because for whatever reasons, for debugging or release purposes, Visual Studio has chosen that project as your Startup Project. These projects run automatically when starting the Visual Studio debugger. This also means that you have the option to run multiple projects when the debugger starts. To read more, check Microsoft's documentation.
The project that is started when starting the debugger is emboldened. If you want to change it, you can right click and set a different as the start-up project
I believe that is set as your "startup" project. You can right click the others and change the startup project that way.

VS2013 Build "Does not support previewing"

Every time I try to build my solution in VS2013, nothing builds, no errors - But in the status bar it says: "This item does not support previewing"
I googled around a bit but have come up empty.
But if I right click on each project and select build it works fine.
Any ideas?
Perhaps this message is totally unrelated... Post hoc ergo propter hoc
Steps to reproduce on my machine:
Right Click any project in solution: select build
Status bar displays Build successful
Right click solution select build
Status bar displays : "This item does not support previewing"
Perhaps it isnt related, but it sure does appear to be.
I was able to fix this... Somehow nothing was selected to build in the solution configuration. I right clicked on the solution, went to properties and then selected COnfiguration Properties and clicked the Build box for all the projects...
I have no idea how they became unchecked, only thing I can think of is a co-worker was trolling me.....
I've had this problem (i.e. debug not starting, and no error message) with Visual Studio 2015 in the following two cases:
after loading a solution that had previously been built with Visual Studio 2010
and also after using the "save as" function in Visual Studio 2015 to update a solution that had been started with Visual Studio 2010 (using Save as updates the solution file and sets the active Visual Studio version to 14 - i.e. VS 2015).
In both cases, deleting the bin and obj directories under the startup project fixed the problem. It's also worth closing visual studio and making sure that there are no {yourprojectname}.vshost.exe processes still running - if there are then kill them before running visual studio again. On that note, if you have multiple versions of visual studio on your machine, you should also check that you don't have the same solution open in the other version of visual studio at the same time (I've done that one myself).
One of the comments here suggests disabling the "enable visual studio hosted process" option. Don't do that if you can at all avoid it: you'll lose lots of debugging functionality (particularly in the area of being able to edit code while your solution is running).
Hope that helps someone out there.
Solution for VS2015
"this item does not support previewing" vs2015 (Visual Studio 2015/2016)
Step 1. Go to Control Panel -> Programs and Features
Step 2. Uninstall all: Windows Software Development Kit - Windows 10.0.10586.15 (maybe you have diff ver)
Step 3. Download new latest Windows Software Development Kit
https://go.microsoft.com/fwlink/p/?LinkId=619296
Install & Create new project, Done!
Dclick on MainPage.xaml and you will see Loading designer...
1: Add below lines in App.conf
<specFlow>
<unitTestProvider name="MSTest"></unitTestProvider>
</specFlow>
2: add a reference to Microsoft.VisualStudio.QualityTestTools.UnitTestFramework.dll
right click on your project and select: Add Reference
3: add using Microsoft.VisualStudio.TestTools.UnitTesting; in Step Defination
4: goto feature file and run it. This is what solve my problem on vs2013
I faced same issue with .aspx file. I just right click on the .aspx file and select open with (HTML Editor). You can choose any form the list.
I have come across the same issue for me, I have opened a project in VS 2010 and then when I open the same in VS 2015 then his error has occurred.
Solution:
By Closing the VS2010 project solution fixed the issue.

Cannot launch the debugger. The required property 'LocalDebuggerWorkingDirectory' is missing or empty

I have the error I wrote in the title when I'm trying to launch the application. I searched with google and I didn't find any page with 'LocalDebuggerWorkingDirectory' keyword. The solution contains a mix of c# and c++ projects and it worked fine until today... I use Windows 7 and Visual Studio 2010. Do you know where I can find this property to change it or how can I add it?
I can repro that, your startup project must be a C++ project. Right-click it, Properties, Debugging, Working Directory setting. Yours is empty. The default is $(ProjectDir)

A project with output type of class library cannot be started directly - with a startup exe

Firstly I'm completely aware of this message and why it happens normally. It's not that I'm just trying to run a dll (like this question).
I have a project that compiles to a dll but has a startup program specified in the project properties. Most of the time I'm able to right-click on the project and select Debug > Start new instance, and it will run the program and let me debug my dll. However, occasionally I get this message (A project with output type of class library cannot be started directly) as if I haven't got a startup program. The first few times I thought it was just me accidentally clicking on the wrong project but I'm certain this isn't the case given that it's happened so many times and I've been careful to watch it.
When this message appears I'm able to try it again and it always works on the second or third attempt.
A colleague using the same Solution never has this problem :-/
Anyone else had this problem or know how to solve it?
I'm using Visual Studio 2005 Pro Version 8.0.50727.762 (SP.050727-7600)
Edit: Also happens with Visual Studio 2010
Another colleague suggested it's because after clicking Debug > Start new instance, while I'm waiting for it to start up, I click on a different project. I don't do it for any reason, just randomly selecting things as I wait for the project to start up. Maybe Visual Studio looks at the selected project sometime after I clicked the menu, gets confused, and shows the error message?
Anyone able to confirm this matches their experience?
Typically problems in VS are caused by:
Add-ins: Run VS without and see if the problems is solved
Corrupted files in your solution: Delete / rename all files created by Visual Studio which are not part of your project, i.e. all .suo, .ncb files and a like.
I had this problem with projects that were created as "Windows Control Library" that somehow forget their status. Unloading and reloading the project usually did the trick.
If it was created as a "Class Library" then to make it a "Windows Control Library" I manually add the following to the .csproj file. It was the only difference I could see between a class library and windows control library project.
BTW - starting a Windows Control Library starts the User Control Test Container - allows you to test any user control in the library. Very cool.
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
add that inside of an <itemgroup> element.
If you plan to use/create/add extra dll's or just have more than one project in your solution, you may get this kind of problem, especially if you forgot a simple rule:
1. In your "Solution Explorer" window. Right click and chose "Set StartUp Projects..."
2. Under "Start Up Project" select and change "Single startup project" to your working entity.
no just make a start up project
Going to resurrect this thread, I have just been experiencing similar issues, when right clicking a project and start new instance..
So instead of right clicking the project and selecting start new instance, I right clicked and clicked set as startup project.
Low and behold a class library project was set to bold, certainly not the one I was right clicking.
I tried selecting a different executable project and setting that as the startup project. Same class library was highlighted as the start up project.
Realised that the current open file was from that project, possibly all the open files were from that project...
closed all open files and tried again.... Problem solved, behaviour as expected for both set as start up project and start new instance options...
Definitely a bug, hope this helps others..
Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework Version 4.0.30319 SP1Rel
This sounds like a transient Visual Studio problem. Reinstallation or upgrade may solve your problem.
I've seen this as well, and it seems like a bug in VS. It happens after you right-click/build a class library (that requires rebuilding), and then right-click/debug > start new instance.
edit- It's still very intermittent, I can't seem reproduce it reliably
I've found that I've had the Startup Project on the Solution set to Current selection, then at some point, I've unloaded a project, and the solution has reverted to Single startup project on a project that happens to be a class library.

Resources