Adding DLL in Visual Studio 2013 causes Compiler Error -107374181 (ERROR_ACCESS_DENIED) - vb.net

I am trying to add a reference to a dll, but when I compile the project I get:
Compiler Error Message: The compiler failed with error code -1073741819.
I have tried:
changing the security permissions on the dll to allow full control
running visual studio as administrator.
I have added the dll with copylocal = false, but it fails at runtime with a "file not found" error.
I created a separate project with the same framework version (4.5) and was able to add the dll without any trouble, but unfortunately I need to add it to the existing legacy project.
The legacy project source files are in GitHub, but the bin folder where I am adding the DLL to is not in Github.

Related

How to add and use a C++ dll in a UWP project

I have created a UWP project in Visual Studio 2017. And I need to access some methods of a C++ dll from my UWP project. For that I have added the C++ dll in the \bin folder of the UWP project. And while debugging, it's showing some errors like
"Unable to load DLL 'testDll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
So I have copied the C++ dll into the \AppX folder. So the error is not showing but it's not working with the C++ dll.
Is there any steps to use a C++ dll in UWP project?
I have seen a step in google which is add the path of the library in the Additional Dependencies property of the UWP project (in Configuration Properties > Linker ) but I can't find the Linker option in configuration properties.
Could you please anyone help me with this.

Files needed to run a standalone exe built with wxWidgets

I have built an EXE with wxWidgets 3.1.4 under Visual Studio 2017.
I can start the EXE from Visual Studio but not outside Visual Studio.
I get the message:
Unhandled unknown exception; terminating the application.
EXE is built in Release/x86.
I have tried to copy the Release DLLs of wxWidgets in the same folder as the EXE as well as files from vc_redist_x86 but I still get the error.
Thanks for your help
It was an application error, a resource file was missing.
I have deleted the Release folder, rebuilt and copied the resource file and the EXE runs.
Release DLLs are in my %PATH% and I have installed vc_redist_x86.exe so I guess these two things allow my standalone EXE to start.
#MaximeVermier,
In order to build the library yourself:
Open ${WXWIN}\build\msw\wx_vcN.sln.
Select Build->Batch Build...
Select all project which says "Debug/Win32"
Click "Build".
The resulting libraries will be in ${WXWIN}\lib directory.
Now all you need is to change the project file for your application and rebuild.
Then you will not need wxWidgets DLLs.

module was expected to contain an assembly manifest Visual Studio 2010 error

I encountered a Visual Studio error while using Visual Basic. All my programs refuse to compile and run. here is the error stated
Error while trying to run project. Could not load life or assembly
'myprogram' or one of its dependencies. The module was expected to
contain an assembly manifest
I tried switching the framework etc. but to no avail.
Try this :
Turn off your firewall and/or antivirus and create a new project with NOTHING added to it.
Try to run the project, clean.
If you still have that error, it means that your VB.NET is corrupted or broken. You will have to reinstall.
If you do not get the error when your firewall/antivirus is off, then it's your firewall/antivirus causing the problem.

Visual Studio 2010 generates an "error" on build

I've got a project that uses a third party OCX. The OCX was recently updated with a new method. I'm trying to insert code that utilizes that new method:
EPS.Refresh_IO_Link(ControllerRow("ControllerPort"), ControllerRow("ControllerSettings"))
It compiles fine, but when I try to run it from within VS2010 it generates the following error:
'Refresh_IO_Link' is not a member of 'AxEPSIO.AxctlEPSIO'.
This is not true. It shows up in Intellisense, and if I do a rebuild the error goes away. However running it in debug mode always generates the error.
I've tried cleaning and rebuilding the solution, but have the same error each time.
DLL Hell. Remove the reference to the .ocx in the project, and then re-add it. If the .ocx was not compiled with binary compatibility, then you are likely still referencing the old version of the .ocx. Also, make sure the new .ocx is registered on your PC (regsrv32.exe).

How to use visual leak detecter ( vld ) for com/atl dll projects?

I included vld.h file in my activex dll project. when i try to compile my project from visual studio 2008.I am getting the following error,
1>Registering output...
1>Project : error PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry.
How to use visual leak detecter for com/activex dll projects?
I don't think this has anything to do with the 'visual leak detecter' (sic?)... I'm not familiar with it.
Anyway, the PRJ0050 error occurs because Visual Studio attempts to auto-register the DLL generated by the project, using a post-build step (see Project Settings), and you are not logged in as a user with permission to modify the registry.
So, either Run Visual Studio as an administrator (if you're on Windows Vista), if you want to allow auto-registration, or remove the auto-registration post-build step from the project.