Reference DLL file not copying to bin with deploym

2019-01-12 20:39发布

We have several external DLL files being referenced in our Web Application Project. We have a deployment project for installing on the hosting servers. When we were using .NET 3.5 and Visual Studio 2008 the DLL file were being copied to the bin folder. Since we have upgraded to .NET 4 and Visual Studio 2010 this no longer happens, and we are getting servers errors since the references cannot be found.

CopyLocal is set to true, and I cannot find anything inside the web.config which suggest this is being set elsewhere.

13条回答
SAY GOODBYE
2楼-- · 2019-01-12 21:17

I was getting the same problem and rather than add a "BeforeBuild" step I created a test that simply did this

    [TestMethod]
    public void ReferenceAssemblyThatDoesNotCopyToBuildFolder()
    {
        Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler referenceThisButDoNotUseIt = null;
    }

And that fixed the error The type 'Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler...' cannot be resolved

查看更多
登录 后发表回答