Unit testing new attribute, constructor with parameters not being found #466
Replies: 2 comments 1 reply
-
Are you able to build and run the sample/unit tests before making these changes? Sometimes restarting your ide helps.
I've had a similar error that appeared in Visual Studio build order, perhaps it's related: It randomly started happening a week ago, I assumed it was caused by a VS update because it doesn't happen with rider |
Beta Was this translation helpful? Give feedback.
-
There were some compile errors in the source code text. Adding public to the types and the method also helped. |
Beta Was this translation helpful? Give feedback.
-
I thought I'd attempt to add the ability to add explicit enum value mapping via a
MapEnumValueAttribute
attribute. I've got theAttribute
class with a constructor and I'm trying to unit test. I'm extending an existing unit test that uses theMapEnumAttribute
attribute... But I'm getting an error in the test that theMapEnumValueAttribute
constructor can't be found (there's only one constructor, public, with two parameters).MapEnumAttribute
has a single public constructor with one parameter and that's working. It's like the new class isn't being included in the syntax tree of the test.MapEnumValueAttribute
is adjacent toMapEnumAttribute
and in the same project.I've added the details to PublicAPI.Unshipped.txt (and also tried PublicAPI.Shipped.txt).
Has something like this been encountered before, or is there something I've missed?
Beta Was this translation helpful? Give feedback.
All reactions