Add dll reference from one project to another visual studio 2013 c #

0

I have a solution with 6 projects. Web mvc Web services Business DAL Entities Infrastructure

The infrastructure one has added a dll in several others of System.Web.Mvc Business uses infrastructure therefore has the dll as a reference. In the web services I add the dll business reference and when executing it generates an error that says that it did not find the System.Web.Mvc.Razor dll

How do I make dragging the dependencies of other projects and dlls when adding a dll of a project?

    
asked by Eldios84 20.09.2017 в 23:43
source

1 answer

1

Remember that the dependencies are copied to the \ bin of the web project by direct reference, if there is a jump in the middle they may not be copied

There are three ways to solve it:

  • add the reference to System.Web.Mvc in the web service project, you can use nuget

  • add the reference to the Infrastructure project in the web service project, as it is a direct reference, add the dependency

  • create a Build Event with the copy command that takes the dll to the web project bin

answered by 22.09.2017 в 22:41