A Project with an Output Type of Class Library can't b started dir

H

Harsha

Hi,

I am trying to debug an application in device. When I hit F5 button to run I
get the message "A Project with an Output Type of Class Library cannot be
started direcly".
And it will stop. But I can deploy it through Build -> Deply solution.
 
G

Guest

Sure, your startup project is a DLL, which can't be executed without an EXE.
You can, however, deploy a DLL just fine. If you have a solution with
multiple projects, the one boilded will be the default. If you've not
explicitly set one, it's whatever project you currently have selected.
Right click on the EXE project and click "Set as startup" and then it will
use it every time.
 
H

Harsha

Hi Chris,

Thank you very much for the reply. Will you please explain in detail how to
do the steps what you have mentioned below. I am new to device applications.

Harsha.
 
S

Simon Hart [MVP]

This is not device specific, it's the same on the desktop too, or in fact any
development environment. Unless you attach to a process that happens to be
calling your DLL - of course.

Simply add a Windows project, File/New/Project - Device Application, then
call your DLL you want to debug from within your Windows Application.

Ensure the Windows project is the startup project.
 
H

Harsha

Thank you very much for your time and help.

Simon Hart said:
This is not device specific, it's the same on the desktop too, or in fact any
development environment. Unless you attach to a process that happens to be
calling your DLL - of course.

Simply add a Windows project, File/New/Project - Device Application, then
call your DLL you want to debug from within your Windows Application.

Ensure the Windows project is the startup project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top