Deploy 3rd party dll files with VSIX Visual Studio extension - dll

I am developing a Visual Studio Extension. I have used a 3rd party dll for UI controls. It adds 2 dll files as reference. But when I deploy my Visual Studio extension, the dlls does not seem to get copied. How do I deal with this scenario and deploy the dll from 3rd party package along with VSIX installer ?
On investigation, I found out that the dlls are getting copied properly inside "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions" folder, but somehow the extension is unable to load them.

You need to tell VS where to load the assembly.

I have resolved the issue. The problem was that the assembly was not in the list of references and therefore it was not getting loaded. To load the assembly manually, I used AppDomain.CurrentDomain.Load() method

Related

How to fix this assembly error vb.net project on Visual Studio 2010

I'm copying my project from other PC but after opening my project I got a warning icon on my references.and when I open the designer it will show error file. how can I find the references dll or to fix this trouble?
See on the PC from which you are copying from where these assemblies are located. You should copy/register assemblies on your PC. If these assemblies are part of third party library, usually it means that your need to install that third party library.

Dotpeek - Modify DLL Files - Use modified(recompiled) in project

I already did the process - Importing dll file in Dotpeek and Exporting Assembly to Project, Now I can modify dll file in VS 2015, but how to recompile the project and use recompiled dll file again in existing project.. I tried with building project in vs 2015 but it displays lots of compile time errors, Please help
Thanks :)
Rather unfortunately, there is no decompiler that will produce code that compiles for an assembly containing more than a couple of classes.
So you might want to try JustDecompile + Reflexil to do your edit. The advantage of this approach is that only the part you edit will get changed and the rest of the assembly will remain the same as original.
You can use dotPeek of Jetbrains, can open any DLL with it by just right-clicking the DLL and Open with dotPeek.
Once DLL is de-compile in dotPeek, right-click click on the DLL in the left sectoin and chose the option Export to Project.
It will open the entire DLL as a Class Library Project in Visual Studio in the case of .NET DLL.
You can modify the source code and recompile the DLLs.
I am not very sure about your requirement, I would advise you to Extend the DLLs method/operation into your project rather than doing an edit on the recompile on the DLL.

Interop dll referencing other dll

I am using bPAC SDK provided by Brother for their label printer. I downloaded their SDK, took a bpac.dll file and put it inside my projects folder then referenced it. Everything works fine until I deploy my app to IIS server because, as it turns out, that bpac.dll is referencing another .dll in C:\Program Files\Common Files\Brother folder and IIS does not have required permissions to access that file. This is VERY strange, and strange is that the bpac.dll in my Visual Studio is marked as Interop, whatever it means. How to solve this? How impot all the .dlls to my project so it doesn't need to access files in system folders?

Sign MyAssembly.XMLSerializers.dll

I have an assembly, which I have installed in the GAC. There is another assembly in the project called: MyAssembly.XMLSerializers.dll. I now know what this assembly is after reading here: Why does MSBuild put *.XmlSerializers.dll assembly in the root folder of published web application?.
This assembly is not strongly typed so I cannot add it to the GAC as it stands. Is there a way of strongly typing this assembly in Visual Studio i.e. without manually decompiling it signing it and then compiling it again.
I know how to mark a DLL as signed (by decompiling it and recompiling it). I was wandering if there was a way of visual studio signing the DLL when it generates it.

How can I DllImport a file from resources using VB.NET?

Is there any way in VB.NET to DllImport a dll file from the resources?
I really don't want to add the dll with the executable path.
You can embed a DLL into an executable:
Jeffrey Richter: Excerpt #2 from CLR via C#, Third Edition
Many applications consist of an EXE file that depends on many DLL
files. When deploying this application, all the files must be
deployed. However, there is a technique that you can use to deploy
just a single EXE file. First, identify all the DLL files that your
EXE file depends on that do not ship as part of the Microsoft .NET
Framework itself. Then add these DLLs to your Visual Studio project.
For each DLL file you add, display its properties and change its
“Build Action” to “Embedded Resource.” This causes the C# compiler to
embed the DLL file(s) into your EXE file, and you can deploy this one
EXE file.
At runtime, the CLR won’t be able to find the dependent DLL
assemblies, which is a problem. To fix this, when your application
initializes, register a callback method with the AppDomain’s
ResolveAssembly event.