Z.R.T.
Z.R.T.

Reputation: 1603

devenv building solution doesn't copy third party dll

I have a solution with two projects:

  1. Project_X (class library) with reference to log4net(copy local = true)
  2. asp.net website with reference to Project_X

Project_X has code using log4net, in particular Log:ILog interface implementation. Website has some code using Log from Project_X. When i build project in studio (VS 2015) i get successful build with log4net.dll in Web Site directory. When i build solution using devenv.com in command line(C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>devenv.com "{path}{name}.sln" /rebuild), log4net is not copied. Why log4net is not copied to Asp.net WebSite when i build solution using devenv ?

PS: i spent a few days looking for answer, found a few post related to this question, but until now haven't found answer.

Upvotes: 1

Views: 188

Answers (1)

mtv
mtv

Reputation: 151

Have you tried to add reference to log4net directly in to website project. Command line may not check the hierarchy for references while compiling.

And yes. Don;t forget to set Copy Local to true on that reference.

Upvotes: 1

Related Questions