I'm facing a weird problem with the deployment of a referenced library (ServiceStack.OrmLite) during Web project publishing. It was working fine until last week or so, and now suddenly some ServiceStack DLLs are not being copied when the project is published to local file system, FTP or Web Deploy, from Visual Studio or msbuild.
OrmLite reference is added to a class lib project via nuget. The class lib project reference is added to the main Web App project. When I publish the Web App project, it compiles and copies all the files except three of the five ServiceStack.OrmLite DLLs (namely ServiceStack.Common, ServiceStack.Interfaces and ServiceStack.Text are not copied). I've checked (and even reset) the 'Copy Local' property to 'true' for all DLL references, but the problem persists. I've also checked that OrmLite is not registered in GAC.
Any tips or suggestions are appreciated.
Update 1:
I came across a bunch of posts related to the same issue (but not with ServiceStack in particular). It seems like Visual Studio and msbuild [rightfully] ignore any indirect references in a project during publish.
Here are some solutions I came across:
Reference the assemblies in the main project as well.
Use a build script to copy the DLLs as a post-build event.
Add a dummy (mock) method to the class lib, and instantiate any class from the assembly or namespace that doesn't get copied during publish. I chose this option and it partially resolved the issue. Now, ServiceStack.Common and ServiceStack.Text get copied, but ServiceStack.Interfaces still doesn't get copied even though I've created a mock instance of 'ServiceStack.Logging.LogManager' which is part of ServiceStack.Interfaces. So, basically I'm still stuck.