Hi, I am having some 'fun' with a VB.Net DLL. I have written and debugged my DLL, built it and copied the .dll file to a separate 'live' folder. Calling applications will reference the DLL in this folder.
Now, when there is an error in my application the DLL code appears on a new tab. Whilst this allows the developer to run through the code which is nice for debugging the application it scares me - will any 'accidental' edits to the DLL code be saved? This would be bad.
I thought this behavious only happened when you used the 'debug' output of building the DLL - I am (I think) using the 'release' version.
All suggestions appreciated!

Visual Studio has to be getting the source from somewhere. You don't get the source code in a debug or release build (yes you can decompile it, but the IDE doesn't).

That being said it depends where the IDE is pointed to.

I am definitely using the 'Release' DLL, I do not have the DLL application running on my PC...and yet, every time my calling application errors the DLL tab appears (and is editable)!
This is catastrophic! What am I doing?

The DLL tab appears with the source code? How are you deploying the application? Do you have the source code for that DLL on the machine you are running it on? Hover your mouse over the tab and it will give you a file path to the code. If you are deploying the application using a deployment package in visual studio you have options to add "Primary output" which is the .DLL, "Debug output" which is the .PDB, and "Source Code". Are you deploying the application with more information than you intended to?

It'as really weird. I just rebuilt the DLL as 'Release' and the problem has stopped. To double check I rebuilt as 'Debug' and the tab in my calling app is not appearing! I have also checked the DLL files in both debug and reelase folders and the date created is not updating in both folders even when I build it using 'All configurations'. I am very confused.

The DLL tab appears with the source code? How are you deploying the application? Do you have the source code for that DLL on the machine you are running it on? Hover your mouse over the tab and it will give you a file path to the code. If you are deploying the application using a deployment package in visual studio you have options to add "Primary output" which is the .DLL, "Debug output" which is the .PDB, and "Source Code". Are you deploying the application with more information than you intended to?

The problem has reappeared. I hovered over the rogue tab as you suggested and the file path points at the original development application, *not* the actual DLL file path! Just be be clear what I did was..
Built my dll from the development app
Copied the dll (+XML comments file) to another folder
Created a new application and refereneced the copied dll
Deliberately created an error in the DLL call...and the tab appears, referencing the *development* app.
This is truly odd!

This article has been dead for over six months. Start a new discussion instead.