I had this somewhat bizarre issue in several versions of Visual Studio, atm 2013. This happened by accident.
I also have dependencies on ServiceStack.Common, which implicitly depends on ServiceStack.Text. However, I do not go anywhere, referring to any class, structure, etc. Inside the binary file ServiceStack.Text.
Even if you install
Copy Local = true
ServiceStack.Text.dll is not copied to the output folder.
I have experienced this with numerous versions of the ServiceStack dll, currently v4.0.15. Could this be a more general Visual Studio error regarding deadlock dependency chains in unused libraries? ServiceStack.Text is probably flagged as a dependency in other ServiceStack dlls, but Visual Studio tries to outsmart it by seeing that the library can be excluded (I'm just thinking).
In any case, I solved this by simply using ServiceStack.Text directly in a private method, placed in an arbitrary file in my own library:
I would expect the compiler to exclude an unused private method - indeed, this probably happens in the IL code, but nevertheless this leads to VS copying the dll to the output directory.
Frederik Struck-SchΓΈning
source share