We are using moles 0.94 for some tests in our solution. However, every time it gets first compiled, the build server will raise a couple of warnings:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (1360): Could not resolve this reference.
Could not locate the assembly "XXX.Moles, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL".
Check to make sure the assembly exists on disk.
If this reference is required by your code, you may get compilation errors.
My understanding is that the build server will try to resolve all the references of the test project before starting to build, and if it cannot find the moles dll under the molesassembly folder (because in the first time, it's empty), it will generate a warning like the above.
But when msbuild starts to build this test project, the mole assemblies will be generated and copied into the moleassemblies folder, so it won't turn into an error.
In summary, for the first time, the build will partially succeed and the next time build will fully succeed.
We are trying not to have any warnings on the build server. Is there any way we can eliminate this warnning on the build server?