开发者

Visual Studio 2010 wants to start project as class library

开发者 https://www.devze.com 2023-04-11 16:29 出处:网络
sometimes i have problems with the debug. I have a solution with some projects (1 WPF application, 1 console ap开发者_StackOverflow社区plication and some libraries - the console application host some

sometimes i have problems with the debug. I have a solution with some projects (1 WPF application, 1 console ap开发者_StackOverflow社区plication and some libraries - the console application host some services and the wpf application is the client).

If i want debug the client (or the host) visual studio means it can not be started because it is a class library. But after some tries and restarts of Visual Studio i can debug one of the projects without problems!

Is there a solution for this problem?

Mfg

edit#1: i have already set a startup project. If i want to debug the client, the host will be the startup project. If i want to debug the host, the client will be the startup project.


When using Visual Studio 2010 (probably even before that ;)), you can specify multiple startup projects. Just right click on the solution, click Set Startup Projects and choose radio button item Multiple startup projects. You can now set the Action property to Start (with or without debugging) for all projects you like.


If you are just hitting debug and haven't set a default debug start project, then it will try and debug the current project, which may well be a class library.

Set the default project by right cliking on a project in SOlutions Explorer and Set As StartUp Project.

0

精彩评论

暂无评论...
验证码 换一张
取 消