3

This is really strange and I can't seem to figure out why it won't work.

I have a C# dll that is a add on for another program, the main program is not mine or a .Net app so I am starting it with Start external program in the debugging tab and and passing my program as a command line and the program starts and loads my add on however my Visual Studio debugger doesn't step into the debugger and won't hit my break points.

I checked the module window and it's not even loaded in there, I used process explorer and had a look at main program and my dll was loaded into the main app.

The project is set to debug, symbols to full and still nothing.

I created the project in VS 2008 and it worked fine and am now trying to get this to work in VS 2010 and no go.

Anyone know what could be causing this?

3
  • Its final release will be launched today. Hope you can give it a try then :) Forget about Beta 2, who is so old and incomplete.
    – Lex Li
    Commented Apr 12, 2010 at 3:31
  • Has this been resolved? I seem to be having the same issue on the non-beta version Commented Aug 23, 2010 at 20:20
  • @Jordan See my answer to the question.
    – Nathan W
    Commented Aug 24, 2010 at 0:28

2 Answers 2

3

I found the solution, copy the following into a xml file named {ProgramToBeAttached}.exe.config:

<?xml version="1.0"?>
<configuration>
  <startup>
    <supportedRuntime version="v2.0.50727"/>
  </startup>
</configuration>

Visual Studio 2010 looks at this file when it loads the program in the debugger to get the right .NET runtime version.

0
1

In VS2010 are you targeting a lower version framework? If so try changing the targeted framework to 4.0 in your advanced compile options.

1
  • Not sure I want to do that quite yet. This is going to be a distributed app. Commented Aug 24, 2010 at 14:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.