I break my code modules up in DLLs alot.
When I add one of those DLLs to my project, how can I browse it's code to set breakpoints?
If you created the DLL, add the DLL's Project to your solution. You can do this by right clicking on the Solution at the top of Solution Explorer and clicking Add... > Existing Project
One solution can contain many projects. You set your executable as the startup project. You can then use Solution Explorer to find the Code in the Modules and do what you like, set breakpoints, make changes, etc.
Make sure the DLL is in your solution (assuming you use visual studio) AND is referenced by the process you are trying to debug. Then the execution should come by your breakpoints. IF NOT, you will notice the dot of the breakpoint is an empty circle.
Related
So I am currently unable to open a Form and get the following error:
System.ComponenetModel.Design.ExceptionCollection was thrown.
or:
The designer loader did not provide a root component and has not indicated why
Usually the way to solve this is to open another instance of Visual Studio with the same project, attach the debugger to the other Visual Studio and try to open the form.
However, that does not seem to be working. The debugger does not break when the error is hit, and attempting to 'Break All' at any other point does not show me the source code and just the screen saying:
Your app has entered a break state, but there is no code because all threads were executing external code (typically system or framework code).
Attempting to put break points also results in:
The breakpoint will not currently be hit. No symbols have been loaded for this document
Am I missing a setting? Incorrect Setup?
I have been battling this for half a day and thoroughly search the interwebs with no luck thus far. My designer is also fairly complex and lengthy which means trial and error is an absolute last ditch option.
First attempt to resolve:
you may have tried it already. Right click the Solution in solution explorer, click "clean solution", this deletes all the compiled and temporary files associated with a solution.
Do a rebuild of the solution and try to debug again.
Second attept to resolve:
Start debugging, as soon as you've arrived at a breakpoint or used
Debug > Break All, use Debug > Windows > Modules. You'll see a list of all the assemblies that are loaded into the process. Locate the one you want to get debug info for. Right-click it and select Symbol Load Information. You'll get a dialog that lists all the directories where it looked for the .pdb file for the assembly. Verify that list against the actual .pdb location. Make sure it doesn't find an old one.
In normal projects, the assembly and its .pdb file should always have been copied by the IDE into the same folder as your .exe. The bin\Debug folder of your project. Make sure you remove one from the GAC if you've been playing with it.
third attept to resolve:
Disable the "Just My Code" option in the Debug/General settings.
there are might be other causes to your problem, i picked them from here. you may try other solution to try resolve your issues. Fixing "The breakpoint will not currently be hit. No symbols have been loaded for this document."
I am trying to generate a manifest for a set of COM objects that are being used in our code as registration-free COM.
For that purpose I created a VB project in VS 2010 and added the COM objects DLLs as dependencies. The problem is I do not see them listed as dependencies in the generated manifest. Am I missing something simple like a project setting to generate the proper manifest listing the dependencies?
You left out too many details and the VB.NET IDE hides too much to do this right. It is not automatic.
Starting point is to force it to show more. Locate the "Show All Files" toolbar button in the Solution Explorer window (use the tooltip to find it back). Click it and you now get the "References" node added to the project.
Open it and locate the COM component that you added to the project. Select it and look at the Properties window. Set the "Isolated" property to True. Rebuild the project. Be sure to look in the Output window for any warnings. And to look at the .manifest file on disk instead of the one the IDE shows you if you added a manifest to your project yourself.
I need to reference in my project a dll library that contains a UI component. So I literally drag and drop it in solution explorer tab, then I add this code on top of XAML page:
xmlns:Banner="clr-namespace:(the namespace);assembly=(name of the dll file without extension)"
When I try to compile the solution, it says that the assembly was not found.
The problem could be build action of the dll? I tried setting the property to "copy always" and the build action to "resource", but with no luck.
Try to check these, common step i do when facing problem with third-party dll reference:
Have you added reference to that dll from your project? if no then add it, if yes check the following
in solution explorer > references, is the reference to that dll marked with warning sign (yellow triangle with exclamation mark in the middle)? if no, that means this is not a common problem, maybe the dll itself problematic or what i'm not sure in this case. But if yes, it means that the dll no more exist in the folder location where you reference it. Copy the dll to that folder location or remove that reference from project and add again pointing to folder location where the dll actually exist.
ps: Hope this help. And sorry if you already did all that before posting the question, all i know what you did is drag and drop the dll to solution explorer.
UPDATE :
After your comment i get what you are after actually. As far as i know, to be able to use dll in code you need to add it as reference in project. Thats why i suggested above steps, to make sure that the dll appears fine in references list in solution explorer. Drag and drop dll or any file to solution explorer only make it included in the project. And including file in project doesn't make it usable from code (except .cs/.vb file). CMIIW.
Just to start off, this question does seem very similar to another post Add the DLL (lame_enc.dll) reference to my project, but I haven't been able to successfully apply that answer. I am pretty new to VB.NET so it is very possible I'm simply missing something obvious.
I am trying to link a DLL to a VB.NET 2010 project to allow my VB app to play *.ogg files. I followed some other advice here on the forums and downloaded FMOD's FMOD Ex Programmers API. I am trying to now reference that functionality. These appear to be the files I need to somehow reference.
C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\fmodex64.dll.
C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\libfmodex64_vc.lib.
I haven't discovered how to add a *.lib reference (or the equivalent), but selecting the DLL as a reference gives the following error.
A reference to 'C:\Program Files (x86)\FMOD SoundSystem\FMOD
Programmers API Windows\api\fmodex64.dll' could not be added. Please
make sure that the file is accessible, and that it is a valid assembly
or COM component.
I'm not sure what I could be missing. Any ideas? Thanks!
In Solution Explorer, double-click the My Project node for the project.
In the Project Designer, click the References tab.
Click the Add button to open the Add Reference dialog box.
In the Add Reference dialog box, select the tab indicating the type of component you want to reference.
Select the components you want to reference, then click OK.
Another approach I was trying is working for me. I found a site with a working example of a LibZPlay VB.NET sample ( http://planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=7789&lngWId=10 ). It runs under VS 2008 and I was able to adapt my project to use LibZPlay (open source library http://libzplay.sourceforge.net/WELCOME.html ) under VS 2008.
That is sufficient for me for now. Thanks for your advice. It was likely some configuration issue or misunderstanding on my end.
Using VB.net 2015 I (could not add or even find a System32 dll) as a reference using Solution Explorer, Tab References. Going to the MAIN Menu, Projects/Add References...
Used Browse and All the System32 dll were visible. Then I was able to load the needed dll.
We have a VB project that loads a reference to a .Net dll (which we also make). Both projects are being simultaneously developed.
When we add new classes to the referenced dll, the main project normally fails to notice the changes.
That is, if we added a new class Bar to the Foo dll, we should be able to type "Foo." and have Bar listed in the intellisense dropdown. It's never there.
Removing the reference and then adding it back in again sometimes fixes the problem. Sometimes we have been able to just manually type Bar in and then rebuild without errors.
It seems to me that there should be some way to tell Visual Studio to reload the referenced project because it has changed. Actually, I think VS should notice the change itself, but failing that, we need a simple way to force a reload.
Any suggestions?
Edit: It is VS2005 and we are referencing output assemblies (the dll)
I had this problem once. Put both projects into a single solution. Right-click on the Solution in the Solution Explorer, and set the build order. Make the main project dependent on the .DLL. Now, when you rebuild the solution, the .DLL gets built first, and the main project will see all the changes.
EDIT: Also, reference the .DLL as a Project instead of selecting Browse when choosing a reference. Then, the changes should be immediately recognized by the main project without rebuilding.