Feofilakt
Feofilakt

Reputation: 1387

Disable debugging of referenced project in Visual Studio

Good day. I have 2 solutions on C# (Visual Studio 2008). First solution contains reference to built dll of second solution. When I debug first solution, appears code of second solution. It is no obvious and no useful for me. I want to debug solutions separately. How can I do this?

Update:

I deleted all PDB files, put DLL in new folder, updated the reference, but Visual Studio still find the source code. I can not hide it from VS! Help me please.

Upvotes: 2

Views: 1163

Answers (1)

demoncodemonkey
demoncodemonkey

Reputation: 11957

The only way VS can find the code for a random DLL is by using the debug information, which is stored in a PDB file in the same folder as the DLL.

So in solution 1, if you are referencing the DLL in the location where it was built by solution 2, then it probably has the PDB file in that same folder. And that's why VS can figure out where the source code is.

Try this:

  1. Remove the reference to the DLL from solution 1
  2. Copy the DLL from solution 2's bin\Debug folder to a brand new folder
  3. In solution 1, add a reference to the DLL in this brand new folder
  4. Also ensure the <dllname>.PDB does not exist anywhere below solution 2's directory structure.

Upvotes: 1

Related Questions