Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio 2010 unable to start program .dll

I have a problem for my visual studio 2010. When I click start debugging button and it's start debugging.

It seems that there is no error "i just create one "button" on it "

But it will show Unable to start program 'c:\users\.....\xx.dll'

Does someone now how to solve it?

The second question is: when I click left button to see the "Button" source code, why it will show all this project code? Should I revise some setting?

like image 374
Eddie Sung Avatar asked Aug 25 '12 05:08

Eddie Sung


People also ask

What is DLL file in Visual Studio?

A DLL (dynamic-link library) is a library that contains code and data that can be used by more than one app. You can use Visual Studio to create, build, configure, and debug DLLs.


2 Answers

Visual studio will not run a .dll by itself. does your solution have an .exe project? if so, right click it and select "Set as Startup Project". if not you will need to create one, and instruct it to load the forms within your dll.

as for left clicking the button, I'm not quite sure what you are describing. can you post a picture?

like image 70
Frank Thomas Avatar answered Oct 04 '22 19:10

Frank Thomas


In earlier versions of MSVC while running .dll, will get a dialog asking path for .exe file

But in MSVC 2010 and above there is no such option. To fix this

  1. Right click on your dll project
  2. Properties
  3. Configuration Properties > Debugging. Here, in Command -> add path to your exe.

Add command arguments, if any.

You are good to go!

like image 29
Digital_Reality Avatar answered Oct 04 '22 19:10

Digital_Reality