I have a solution in which I needed to brand an assembly for a third-party client. This resulted in a class structure as follows:
Project1
References
MyBrandedAssembly.dll (namespace: MyAssembly)
Project2
References
Project1
When MsBuild built Project1
, it could resolve the MyAssembly
namespace to MyBrandedAssembly.dll
:
Primary reference "MyAssembly".
Resolved file path is "SolutionPath\Binaries\MyBrandedAssembly.dll".
Reference found at search path location "{HintPathFromItem}".
But when building Project2
, it could not resolve the second-order reference:
Dependency "MyAssembly".
Could not resolve this reference. Could not locate the assembly "MyAssembly".
Check to make sure the assembly exists on disk. If this reference is required by your
code, you may get compilation errors.
For SearchPath "SolutionPath\Project1\bin\Debug".
Considered "SolutionPath\Project1\bin\Debug\MyAssembly", but it didn't exist.
Why not? And how can I force it to?