I am trying to debug a
Custom Template Building Block defined in a
.Net Assembly TBB according to the documentation. I am building the .Net Assembly using below command in the Post Build event of the solution.
"$(SolutionDir)tools\ilmerge" /lib:" C:\Windows\Microsoft.NET\Framework\v4.0.30319" /lib:"$(SolutionDir)Dependencies" /t:dll /targetplatform:v4,C:\Windows\Microsoft.NET\Framework\v4.0.30319 /out:"$(TargetDir)$(TargetName).merged.dll" "$(TargetDir)DD4T.Templates.Base.dll" "$(TargetDir)DD4T.ContentModel.Contracts.dll" "$(TargetDir)DD4T.ContentModel.dll" "$(TargetDir)DD4T.ContentModel.XmlSerializers.dll" "$(TargetDir)DD4T.Serialization.dll" "$(TargetDir)Newtonsoft.Json.dll" "$(TargetPath)"
The merged DLL with PDB file generated successfully. But when I upload the merged dll to the TBB and try to debug in visual studio, no breakpoint is being hit, it says "The breakpoint will not currently be hit. No symbols have been loaded for this document.”
On the other hand, If I DON'T merge the Templating DLL before uploading and register the other dependency DLLs (I used to merge before) in GAC, The debugging works as expected.
Can someone help me, if I am missing anything during ILMerge or after?