It happened to me a couple of times just after adding the Collection and the CollectionDefinition decorators and I always arrive to this answer when looking on Internet.
But in my case the problem was just that it seems that a 'Clean Solution' action is needed before testing whether it works or not. Without cleaning the solution I always get a The following constructor parameters did not have matching fixture data error.
So, I write also this answer in order to help my future self.
Anyway, in order to avoid the problem explained by Nikola Schou, you can always use a constant to avoid name mistmatching:
public static class Collections
{
public const string ActorProjectCollection= "ActorProjectCollection";
}
-
[Collection(Collections.ActorProjectCollection)]
/// ...
-
[CollectionDefinition(Collections.ActorProjectCollection)]
/// ...