New to Visual Studio and new to C#. Building a C# windows service called Transactional Messaging in Visual Studio 2017, which is dependent on a project called Outbound Messaging. When I start debugging and try adding breakpoints on the Outbound Messaging files, I get
"The breakpoint will not currently be hit. No Symbols have been loaded for this document"
From what I can tell, VS is only unable to load the pdb files for: log4net.dll, Castle.Windsor.dll, and Castle.Core.dll. I don't have this issue with adding breakpoints to files in the Transactional Messaging Service. I haven't been able to identify behavior patterns or a permanent fix, so at this point the error seems random. One minute I think I've found a fix, and when I try using that fix on the same error later in the day I have no luck. I am suspicious of a recent power outage that shut my computer down unexpectedly since it looks like pdb files can be cached, but have been told that would be a long shot.
Steps I follow to debug the service:
- Stop Transactional Messaging Service via windows services applet
- Uninstall Transactional Messaging Service via VS command line using
installutil /u TransactionalMessaging.exe
in the Debug folder - Clean Transactional Messaging Solution in Visual Studio
- Build Transactional Messaging Solution in Visual Studio (at one point a fix was to right click on each aspect of the solution in the solution explorer and build that individually)
- Install the Transactional Messaging Service via VS command line using
installutil TransactionalMessaging.exe
in the Debug folder - Start the Transactional Messaging Service via windows service applet
- In VS, Debug > attach to process > Transactional Messaging
- Try adding breakpoints to files in Outbound Messaging service which gets me the above error.
Steps I've tried to solve this error:
- Debug > Windows > Modules to manually load each module's symbols (pdb files for log4net.dll, Castle.Windsor.dll, and Castle.Core.dll cannot be found) picture of modules
- Completely delete bin and obj folder between steps 2 and 3 above
- Project > Project properties > Build > Advanced > Debugging Information: full (for both Transactional Messaging and Outbound Messaging)
I'm not sure if this is a lack of understanding of VS, C#, or the code base. Any insight is appreciated, I'm past the googling stage and posting a new question as a last resort.