Reference dll from resources - xaml

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.

Related

Generate manifest for regfree COM from a VB project

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.

Adding DLL reference to VB.NET project

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.

How to set breakpoint in DLL

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.

VB.NET - how to remove Infragistics references

I moved a vb project to a new computer. This one does not have Infragistics libraries installed. Apparently on the original computer it was installed, and the vb project must have some reference to it (see error bellow) even though I'm not using it in the project. So I am getting this error on the new computer.
Unable to resolve type 'Infragistics.Win.UltraWinGrid.UltraCombo, Infragistics2.Win.UltraWinGrid.v9.1, Version=9.1.20091.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb'
How do I get rid of it?
Look in the list of "references" for the project, if there is a reference in there (probably with a yellow warning shield) then simply delete it. After that look in the vbproj file for any other references. That should address it.
If it is not in either of those two areas, look for imports in the source files themselves.
If you want to remove all refrences of the Infragistics components. You need to remove from Refrences folder, by doing this you have to remove all the code refering to the controls using those refrences. You need to use predefined controls.
You can use the add or remove program in control panel. using that you can uninstall the this components.

Force reload of a referenced .Net component in VS2005

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.