none
BC2017 error "could not find library 'C:\path\to\file\OurCompany.HITS.LLBL.Adapter.dll'" RRS feed

  • Question

  • Howdy All,

    I've got another newbie question. I recently tried building my Visual Basic solution and now I'm getting all sorts of errors (39 in total). They seem to center around Visual Studio's inability to find a slew of .dll files. When I try to navigate to the folders where the .dlls are supposed to be, the folders are indeed empty. As I understand it, the .dlls were supposed to be generated when the project was built. As a full-time student and part-time intern, I'm kind of at a loss as to where to start (lots of googling). The senior developers where I work are not sure what the problem could be and are busy with other projects. Any advice or help you might offer as I try to work through this would be much appreciated.

    Kind regards,

    Jonathan

    Using VS 2017

    I found these articles:

    I went to the path one of the posters suggested (C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files) and the Temporary ASP.NET Files folder was already empty: https://social.msdn.microsoft.com/Forums/en-US/28e74413-2aa4-47ef-b073-1daa4c7bc1e1/bc2017-could-not-find-library?forum=asmxandxml

    None of my files have commas in their name so this article didn't help: https://www.codeproject.com/Questions/1068332/Build-error-could-not-find-library


    • Edited by GriffManVB Wednesday, March 28, 2018 1:09 PM remove company specific information
    Monday, March 26, 2018 9:03 PM

Answers

  • Okay, so one of my co-workers had me unload 4 items from the Solution (in Solution Explorer). 2 were .wixproj, one was a .vbproj, and the other was a .csproj. After unloading these, the .dll errors went away. Thank you to all for your time and effort in helping me resolve this.

    Best,

    Jonathan


    • Marked as answer by GriffManVB Wednesday, March 28, 2018 6:16 PM
    • Edited by GriffManVB Wednesday, March 28, 2018 6:16 PM correct grammar
    Wednesday, March 28, 2018 6:16 PM

All replies

  • Hello Jonathan,

    Have you checked Configuration manager (right click on solution explorer to find it). Make sure "Build" is checked for the projects producing the DLL's if you have created them and not using third party DLL's

    Verify the Build path under project properties is correct.

    If both are correct and you have already done a clean then rebuild of the solution from Solution Explorer then close the solution, delete all obj folders in your projects that are having issues (of course make a complete backup of the solution first), open the solution and do a rebuild.

    Let us know of any of these suggestions work or not.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Monday, March 26, 2018 10:47 PM
    Moderator
  • They seem to center around Visual Studio's inability to find a slew of .dll files. When I try to navigate to the folders where the .dlls are supposed to be, the folders are indeed empty. As I understand it, the .dlls were supposed to be generated when the project was built.

    Nah, the DLL(s) should be in the Bin folder of the project so that they can be found by Visual Studio and by .NET. The DLL(s) are not scattered all over the place.

    As an example, when you deploy a program.exe file to another computer, then all DLL(s) that the program needs has to be deployed to the same folder as the programname.exe so .NET can find them.

    Monday, March 26, 2018 11:01 PM
  • Karen, thank you for your prompt reply. I've checked the Configuration Manager for the Solution (I don't see one for the individual projects within the the solution). Under the Active Solution Platform: Any CPU, all of the projects are checked. Same is true when I change it to Mixed Platforms. However for x86 several of the projects are not selected.

    Also, one of my co-workers suggested that I delete the bin folder from one of the projects and do a Clean > Build and see if the bin was rebuilt. Even after the bin folder was rebuilt, the dll is not there. Also, I don't know if my build output path must be bin\Debug\ (per your screenshot), but mine is set to ..\..\Source\HITS\bin\Debug\

    I have yet to delete all the obj folders in my solution, but that will be the next step after backing up the solution.

    Wednesday, March 28, 2018 2:41 PM
  • Hello DA924x and thank you for your explanation about how the dlls are located. I think I beginning to understand. All the dlls (from the various projects that comprise the solution) are moved into the same folder so that .net can find them. As I check the Build Output paths for the various projects (Right click project > Properties > Compile > Build output path) I see that they're not all set to the same output path. Should they be?

    • Edited by GriffManVB Wednesday, March 28, 2018 2:55 PM update with correct information
    Wednesday, March 28, 2018 2:49 PM
  • Okay, so one of my co-workers had me unload 4 items from the Solution (in Solution Explorer). 2 were .wixproj, one was a .vbproj, and the other was a .csproj. After unloading these, the .dll errors went away. Thank you to all for your time and effort in helping me resolve this.

    Best,

    Jonathan


    • Marked as answer by GriffManVB Wednesday, March 28, 2018 6:16 PM
    • Edited by GriffManVB Wednesday, March 28, 2018 6:16 PM correct grammar
    Wednesday, March 28, 2018 6:16 PM