Search code examples
visual-studio-2015azure-service-fabricproject-reference

Adding a service fabric project reference to a unit test is generating an unexpected reference path


Each time we attempt to add a reference to a service fabric Web Api project to a unit test project we have just created we are getting the following issue:

C:\TFS\Finance\Payments.Card\Int\Source\Finance.Payments.Card.ServiceFabric.Web.Api\ obj\x64 \Release\Asos.Finance.Payments.Card.ServiceFabric.Web.Api.exe

The section in bold is the issue. We are unsure why this is happening by default as it's causing us issues in our CI pipeline.

If we delete the obj folder, it still points to it after re-adding the reference. It doesnt point to the bin folder which exists and contains all the relevant assemblies


Solution

  • It turns out it wasn't building correctly as one of the platform targets for the release configuration wasn't correct, Debug was targeting X64 and release was set to any CPU, as soon as we altered this and rebuilt in both Debug and release, the references fixed themselves.