Reference DLL file not copying to bin with deployment project, causing error

前端 未结 14 860
刺人心
刺人心 2020-12-04 09:23

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 .N

14条回答
  •  -上瘾入骨i
    2020-12-04 09:40

    There is a bug in Visual Studio 2010. By default the XML in the solution file looks like this:

    
    ..\References\DevExpress.SpellChecker.v11.1.Core.dll
    
    

    Whereas MSBuild is expecting this below, so that the DLL file will be included in the deployment:

    
    ..\References\DevExpress.SpellChecker.v11.1.Core.dll
    True
    
    

    The trick is to set Copy Local to False, save the project and then reset it to True - save again. This includes the Private node correctly, which MSBuild respects.

    It appears that the default for no included private node (Copy Local) in Visual Studio 2010 is True, while MSBuild reads that missing node as False.

提交回复
热议问题