hi,
I made one dll and use it in my project, when i debug my project it show the dll code and its class and method. I dont want show that dll code. Please tell me the solution.

Dani AI

Generated

This behavior usually happens because the class library is being treated as "user code" by Visual Studio (for example, when the library project is referenced in the same solution). As hinted, replacing a project reference with the compiled assembly or preventing the debugger from loading symbols for that DLL will stop the debugger from opening the library source. The following checklist covers the reliable fixes and relevant debugger settings.

Replace the project reference with a binary: remove the .csproj reference and add a reference to the built MyLib.dll (preferably the Release output). Ensure no .pdb files for that assembly are available to the process if stepping into the code is undesired. Adjust Visual Studio debugger behavior via Tools > Options > Debugging: enable Enable Just My Code, disable .NET Framework source stepping and Enable source server support, and remove symbol paths under Debugging > Symbols that point to the library PDB. If symbols were already loaded, use Debug > Windows > Modules to view the assembly and unload its symbols or inspect symbol load information.

Tradeoffs and notes: removing project references or PDBs prevents stepping into that code but also limits troubleshooting when genuine library bugs need investigation. For distributed libraries that must hide internals, build Release without debug info and consider obfuscation. For authoritative guidance on the debugger classification and symbol loading, see the Visual Studio documentation on Just My Code (Just My Code documentation).

Recommended Answers

All 3 Replies

Why it is showing that because it is not the normal behavior have you referenced the DLL or the .csproj file of the class library?

thanks abelLazm, i got the solution.

:) oh that's nice if you get the solution then please share it with others and also mark this thread as solved. Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.