views:

34

answers:

1

We have a project which utilizes Sharp Architecture. For the purposes of some testing, we made some adjustments to strongly type some assemblies.

Following this, the project would no longer build. VS2010 complained that:

error CS0012: The type 'SharpArch.Core.PersistenceSupport.IRepositoryWithTypedId`2' is defined in an assembly that is not referenced. You must add a reference to assembly 'SharpArch.Core, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b5f559ae0ac4e006'.

The reference has been removed and re-added. It's also in the GAC and we've verified that the Public Key Token matches.

A: 

This is my checklist with the most likely cause on top.

  1. Make sure your project is not set to ".NET x.x CLIENT Framework". This one gets me all the time.
  2. Try cleaning your solution. I find that VS gets confused sometimes and needs you to clear out the obj/bin folders.
  3. Restart VS
  4. Set the reference to copy locally.
  5. Change it so that it doesn't request a specific version.
  6. Change it so that it does request a specific version.
  7. Remove the reference to the GAC version and add one to a version stored in a file.
Jonathan Allen