Asked By
AshokS
800 points
N/A
Posted on - 06/12/2011
Good evening,
I am using Microsoft visual studio 2010 ultimate and my base Operating System is Windows XP Service Pack 3.
Nowadays, I am working on a project developed in C# language.
I am facing a problem whenever I tried to add a dll file as reference in this project, I get the error mentioned below .
Microsoft Visual Studio
A reference to ‘C:Documents and Settingsashok.sMy DocumentsDLL Filesnet.dll’ could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."
I try to resolve the issue and find out that the ILD assembler indicating not valid CLR header in the file.
Now I do not know how to tackle this problem, and I need a response urgently as it is causing delays in my product development schedule.
Any hint or tips in this regard?
Thanks.
Answered By
joicy
0 points
N/A
#118932
Unable to add dll file into the project
Dear friend, you are unable to add DLL file into the project. To give an answer to your problem, I need to know something like, are you adding a managed DLL reference? Try to always make a small report then send it to fsbugs at MS.com.
This problem is caused by DLL and can be managed by C ++, but I'm not sure. You are required to send a bug report to F# team to get better suggestions. Otherwise add as assemble reference to the output of C++ then browse the assemble and add reference dialog. But it's important to manage correct versions of reference assembly. Generally, it depends on build configuration.
For this cause add reference manually to .fsproj.
Thanks.
Unable to add dll file into the project
Hi AshokS,
As I get from your words, you got this error when you were trying to add a dll to your project (not during compile). I want to know whether this problem appears to you when you try to add any other dll or this dll only? Maybe the problem is due to permission or security issue. There is a set of steps you can do; try any of this solutions:
-
Clean the solution, and rebuild.
-
Remove all bin folders and rebuild.
-
Try to map your project to different location in your PC other than the C drive.
-
Run the Visual Studio as an administrator
Hope any one of these tries will help you in solving the problem you are facing.
Best regards,
Barbara.