Share via


Project .dll not copied to \bin folder only in \obj folder

Question

Wednesday, December 23, 2015 8:11 PM | 1 vote

I'm using VS 2015 Community Edition. I have a Solution with 8 VB Projects, which had been building fine until recently. Now after I do a Rebuild Solution I get an error message (no error code) and for my main Startup Project:

could not find library 'D:\......\project folder>\bin\Debug\Proj1.dll'

And indeed that file is not there. This is a new project I added recently, but was working (Rebuild Solution) for a while.  The Project (Proj1) builds fine, AND the .dll file is created for the project but it is only in the ..\Proj1\obj\Debug folder, it is not being copied to the \bin\Debug folder.  My other 6 Library Projects all copy the .dll from the obj\Debug folder to the bin\Debug folder fine.  I can not figure out why this one is now not working.

Clues:

1. I did change the Assembly Name and Root namespace to match the Project name (in Proj1 Properties, Application tab) recently.

2. In my startup Project for the Solution, in References I reference all of the Projects.  The problem Project (Proj1) is shown in the References: and the path for the .dll is from the projects \obj\Debug folder, All of my other Projects shown in the References: the .dll file Path is from their \bin\Debug folders.  I added references the same way for all projects by selecting Add -> Solution Projects then checking the box next to the Project.

3.  If I just Build the Project, it only puts the .dll in the obj\Debug folder, not the \bin\Debug folder.  If I do the same for any of my other Projects it puts the .dll in both the \obj\Debug and \bin\Debug folders as expected.

I can not figure out what is different about this one Project to cause this.

Thanks for ANY advice.

Curtis

All replies (3)

Thursday, December 24, 2015 11:13 PM âś…Answered

Hi Weiwei,

Yes, I did check both of those (in my 'bad' version of the Solution) and they are set as you said they should be.  For a vb.net Project it is slightly different in that the Build output path is set on the Compile tab and my reference properties don't include Alisases... but the two items you say to check were set correctly.

At this point I have 'solved' the problem by going back to my last working backup (not too far back) and started there and cut & pasted in the parts of the source code that had changed, and all is working, but it still bothers me that I can't figure out what is causing this problem that I had. 

Thanks again for your ideas.

Curtis


Thursday, December 24, 2015 9:03 AM

Hi curtis56,

Please check the Output path of the Proj1 from Properties -> Build tab. We often assign the project's output path here. If I delete the path value in the textbox, the dll won't be generated in bin\Debug folder.

In addition, please check the Copy Local property of proj1.dll in the Main project's References (right-click Properties), the default value should be "True".

Best Regards,
Weiwei


Friday, December 25, 2015 2:54 AM

Hi curtis56,

I'm glad that you can work with your project now. I think there may be some properties of that project been changed careless when developing.

Tanks for sharing your workaround here. Since now you can work with your project, I will close this thread later.

If any questions in future about Visual Studio IDE, please feel free to come back to our forum.

Best Regards,
Weiwei