zlib.dll unable to add reference - c#

I am working in VS 2012 C# and trying to add reference to zlib.dll, which I downloaded from ZLIB web-site. I am getting the following error message while trying to add reference:
A reference to 'C:\CTS\T4ClientSim\bin\zlib1.dll' could
not be added. Please make sure that file is accessible, and that is
a valid assembly or COM component.
I tried to launch VS as administrator, but it did not help.
Any help?

Related

dll reference Error in c# windows form App project

I am trying to add a dll into my windows form application type project. However, when I am adding the dll to reference folder it is throwing an error and restricting me to add the same. Enclosed is a screenshot. Can anyone please let me know, under which condition we get this error and how to fix it?
Note: I am not aware, the dll has been produced using what tool or version/type of it.
screenshot of error
The message is:
A reference to C:\xyz.dll. dll could not be added, Please make sure
that the file is accessible and that it is a valid assembly or COM
component.
It's is exactly what you read and the message says.
Either thhis DLL doesn't contain any .NET code or class, or this DLL isn't a valid ActiveX DLL containing a typelib.
You can not add a DLL as a reference if it is not one of the above.
This is a possible duplicate to

C# Visual Studio - Having trouble adding an assembly reference

So, I'm new to adding assemblies and whatnot. I work in Unity and I want to add the Puma.NET OCR software to my build, but I'm having a lot of trouble. Here are the instructions to integrating the code into your project: https://drive.google.com/file/d/0BwGzQQGm378jNEVlcmlPU3gtcTg/view?usp=sharing
In Visual Studio, I added the references to my project Puma.Net and puma.intercomp. It's not letting me add the last dll file for some reason.
I have a test script which says "using Puma.Net" at the start. When it compiles in Unity, I get this error:
Unhandled Exception: System.TypeLoadException: Could not load type 'Puma.Net.PumaPage' from assembly 'Puma.Net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5e8cf038eac46fae'.
I've been at this for hours and I've been trying all kinds of different things, but I can't understand what I'm supposed to do. Any help?
I can´t read the instructions you posted, since the site sent a "file not found" when I click download. Anyway, you must follow these simples steps:
1) See if the NET version of PUMA is compatible with the same NET version you´re utilizing (eg. 4.5 or 4.6).
2) Add the reference to your project using the "Add Reference" and BROWSE the listed DLL´s of PUMA.
3) In the top of you main form, add "Using xxxxx" where that xxxxx is the name of the PUMA library
If it is not functioning, maybe it´s due to an incompatible library to UNITY - check this at PUMA site.

adding matlab COM reference in visual studio fails

I'm trying to invoke a matlab function from my c# code.
I understand that i need to add a COM reference to mlapp.tlb but apparently my matlab isn't installed correctly so vs 2012 doesn't find the reference in the COM list.
I tried adding the reference by browsing to mlapp.tlb from the add reference menu but i get the following error:
mlapp.tlc bould not be added. please make sure that the file is accessible and that it is a valid assembly or COM component.
Can someone help?
Thank you.
An unclean installation of MATLAB could well be the cause of this issue. It might be fixed by registering MATLAB as a COM server. Have you seen http://www.mathworks.com/matlabcentral/answers/101093?

Visiblox invalid assembly reference

I am struggling with a problem regarding to visiblox. I am quite new to the WPF concept, but I am getting the hang of it. I have quite some expirence with the classic forms.
My problem is that the designer keeps telling me that the XAML contains errors. And I get the folling error in my error list:
Unable to load the metadata for assembly 'Visiblox.Charts'.
This assembly may have been downloaded from the web.
See http://go.microsoft.com/fwlink/?LinkId=179545.
The following error was encountered during load: Could not load file or assembly
'Visiblox.Charts, Version=2.1.4.31043, Culture=neutral, publicKeyToken=1543c03f04c4461b' or one of its dependencies.
I have added the reference to the project, and I have added the line:
xmlns:charts="clr-namespace:Visiblox.Charts;assembly=Visiblox.Charts"
I can build and run the project, but the designer keeps telling me that my assemblies are not correct. I tried to clean and rebuilt the project. Restarted Visual Studio and the computer, but nothing seems to work. Anyone any clue? Thank you in advance.
I'd suggest following the link it provides: http://go.microsoft.com/fwlink/?LinkId=179545
The problem is that the dll is "locked" by windows security and you need to unlock it before you can reference it. The link specified tells you how.

Unable to open my C# project

I'm unable to open my project in Visual Studio 2008. It was developed in C# by my friend. It is showing the this error:
"Could not find type 'LibrarySystem.ctrlSeparator'.
Please make sure that the assembly that contains this type is referenced.
If this type is a part of your development project, make sure that
the project has been successfully built. "
Also
"The variable 'ctrlSeparator1' is either undeclared or was never assigned. "
How do I rectify this problem?
With all respect...the error message tells you everything you need to know...
It's trying to load a control, which does not exist. So either your friend didn't give you the whole project, or he used a Third-party-Component which you don't have.
Obviously your friend used (or wrote himself) a external library.
Ask him to provide you with this assembly, so that you can compile the project.
Either you don't have the complete project or you need to register dll. Make sure you have LibrarySystem.ctrlSeparator in code or assembly. If it is in unmanaged assembly then ask to friend whether it is needed to be registered.

Categories

Resources