0

I get this warning in a C# project:

Assembly 'bin\DAL05.dll' is incorrectly specified as a file.

The project does reference DAL05, which has these values:

Description = "Data Access Layer for VS2005"
Version = v2.0.50727

Also, the project's bin folder contains DAL05.dll with these values:

BuildAction = "Content"
Copy to Output Directory = "Do not copy"
Full Path = "C:\Projects\PRP\PlatypusReportingPackage\bin\DAL05.dll"

What does it mean that this DLL is considered "incorrectly specified as a file"? Since it's "just" a warning, can I blissfully ignore it, or is this a potential shoal reef?

1 Answer 1

2

You should not see the bin folder in the solution explorer, meaning, the bin folder should not be a folder under your project.

The bin folder is maintained by Visual Studio and the referenced assemblies and referenced project output assemblies are copied there.

Instead of having a bin folder and the dll files added to this bin folder, you should add a reference to that assembly. The bin folder will automaticaly be created and the referenced assemblies will automatically be copied to the bin folder, or if any of the referenced assemblies is in GAC (Global Assembly Cache), they will be loaded from there.

  1. Add references to assemblies which you currently have in your bin folder

    1.a. If you need to, just create an "extlib" or "dependencies" or a similar folder under your project and copy the dll files there, and reference the assemblies from that folder.

  2. Delete the bin folder from the project
  3. Compile
Sign up to request clarification or add additional context in comments.

4 Comments

I do have a reference to the assembly; its path is C:\Projects\CRP\CustomerReportingPackage\bin\DAL05.dll
You say to remove the bin folder from the project, but also that it will be automatically created by VS. So the issue is its visibility in the Solution Explorer?
I hope your problem is solved, if you need further help, please just comment.
Yeah, thanks, I removed the Reference, excluded the Bin folder from the project, then added back the Reference, but from a "Shared" folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.