I build my debug version, install it in GAC, then I reset iisreset .When i place a breakpoint I get the message:
breakpoint will not currently be hit. no symbols have been loaded for this document
Have u had this before.
I build my debug version, install it in GAC, then I reset iisreset .When i place a breakpoint I get the message:
breakpoint will not currently be hit. no symbols have been loaded for this document
Have u had this before.
sometimes i can break through code in vs2005 to debug a site
OriginalBigDan
Hi Ishai, I use your tool, it s good, helping me a lot. One little thong though, I have this problem that I posted but no body could come up with an answer yet (in other forums)
sometimes i debug my project.
actually i made a post build event to deploy the built dll in te GAC automatically. (using your tool)
sometimes, after i build the dll, my browser displays nothing and the gac is empty. I wait few seconds or even few minutes before i can view the GAC contents again.
have u had this b4
Thank you
jason.t
The problem is to do with where the debug symbols get created. If the assembly is in the GAC, it will be looking for the debug symbols in the same dir as the assembly, which will be c:\windows\assembly\gac\[assemblyname]\version.
If you copy the debug symbols file (*.pdb) to the appropriate directory and then you should be able to debug. As long as you don't change the version number you can probably point the output dir to the gac\... dir and build to there, or just create a build event to copy the pdb...
ErSehmi
Aatu
Hey .. you get the "No Symbols Loaded" message because the assembly hasn't been loaded by the Web Application yet.
I do SharePoint development every single day and I almost always put my DLLs into the GAC for debugging, you don't need to copy any PDB files .. that is rubbish!
When the SharePoint application starts then it goes and loads all of the relevant assemblies into memory. The important word here is relevant assemblies.
If you are building a Site Provisioning assembly, then that assembly will ONLY be loaded into memory when you create a new site using that Web Template.
It is at that point that SharePoint goes to the GAC and fetches the assembly to load it into memory.
Once the assembly is into memory you should find that Visual Studio suddenly jumps into life .. and the "No Symbols Loaded" message disappears!
The same goes for Event Handlers. The event handler assembly will only be loaded into memory when the event trigger fires, and SharePoint goes and fetches the code that handles the event (i.e. your assembly).
So .. until the event gets fired for the first time, Visual Studio will be displaying "No Symbols Loaded" (because it can't find your code anywhere in the running process). When the event actually gets fired then the process gets updated with your assembly, and Visual Studio recognises the code in your project and your breakpoints will suddenly start working.
NOTE - due to this loading of assemblies into memory you must make sure that you reset the application pool (or IISRESET) each time you upload a new version into the GAC. Otherwise the process will still be using the old version .. and that means that your project will not match the version of the assembly that is in memory and you won't be able to debug.
Hope this makes sense .. and clears up a few things.
So ... no need for any fancy configuration, or copying of PDB files, or any fancy scripts ...
You just need to understand the web application memory handling, and caching of assemblies from the GAC.
regards
MKeeper
dotnetsr
The way I do it, I build in my work folder then all I do is copy the dll file to c:\windows\assembly
That s it. should I copy the
pdb file as well where in my situation. In my case I don t really copy anything to c:\windows\assembly\gac\[assemblyname]\version. Should I do that
Thanks
EtherealSky
InfiniZac
Ahhh .. remote debugging. Didn't realise you were doing that.
Mostly we do our development and debugging on the same server (because we use throw-away virtual environments). So thats probably the big PDB difference.
Israel Brewster
MKeeper, thanks for your input. It makes sense, but it doesn't clear it up ... at least not yet. Maybe I'm doing something wrong, but like the original author, even when it's not a site provisioning assembly, the breakpoints don't work unless I do as I explained. Then they do. In other words, if I install the debug version of an assembly with breakpoints into the GAC without doing anything else, the breakpoints don't work, even after all relevant assemblies have been loaded AND run. The assemblies in question are custom application page code-behind assemblies. Would that make a difference Could it be a remoting issue The project with the symbols file is in my case on a different machine. --Mike
Harshil_Patel_5326c0
Your script has this:
path = "E:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\"
gacutil.exe /if "$(TargetPath)"
copy "$(ProjectDir)\app.config" "C:\WINDOWS\ASSEMBLY\GAC_MSIL\$(TargetName)\[ASSEMBLY_VERSION]__[ASSEMBLY_PUBLIC_TOKEN]\$(TargetFileName).config"
RecycleAppPools.vbs
In my app I have no app.config nor RecycleAppPools.vbs should I copy them from somewhere as well or just use this:
path = "E:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\"
gacutil.exe /if "$(TargetPath)"
copy "C:\WINDOWS\ASSEMBLY\GAC_MSIL\$(TargetName)\[ASSEMBLY_VERSION]__[ASSEMBLY_PUBLIC_TOKEN]\$(TargetFileName).config"
without the app.config or the RecycleAppPools.vbs parts. I also want the iisreset automatic pls
Thank you
Jarda Jirava
Tutus,
You really should try to figure these things out. My post is talking about an event handler, and not a web part and thats why it also copies a config file after putting the dll in the GAC.
If you dont need that (and you dont), just delete the copy line.
The recycle application pools vbs script code is also there in the post in the code. just copy that code and paste it into a text file and name it RecycleAppPools.vbs and put it in the directory specified in the path.
Ishai Sagi
www.spstips.blogspot.com
search and deploy
I have written a script to do that. read about it in my blog post (full link: http://spstips.blogspot.com/2006/10/gac-access-denied-solution-free-post.html)
basically its just adding a script to the post-build event.
Ishai Sagi
www.spstips.blogspot.com
Ultrawhack
Not sure how you can acheive that 'automatically' but I use Build Events to do it.
I also use the build events to do things like, copying ascx/xml files for custom field types/features etc and doing an IISReset.
hayek85
tell me pls, i read before that it s possible that when we build a project the built dll goes directly to assembly without doing that manually. any idea how pls
Thank you
Jafar Bhatti
I had the same problem and I used a simple fix. During development, don't copy the assembly to the GAC. Just copy the assembly and its debug symbols file to _app_bin folder of the virtual directory that WSS is using on the web server that is hosting WSS. You might see several of these _app_bin folders. If you're not sure which one it is, just copy your assy and symbols file to all of them. Remove them when you're done with development. Works like a charm. -Mike Sullivan, MCAD