-
Notifications
You must be signed in to change notification settings - Fork 88
Exception is thrown if type is placed in the Validation namespace #669
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
This worked well before v5.0.0
Place your type inside the Validation folder:
using Vogen;
namespace Xxx.Validation;
[ValueObject<string>]
public partial record MyValueType {
//...
}This error is thrown from the generated class:
error CS0234: The type or namespace name 'Invalid' does not exist in the namespace Xxx.Validation' (are you missing an assembly reference?)`
I think it is related to this piece of code:
Vogen/src/Vogen/GenerateCodeForTryFrom.cs
Line 105 in dedb1f9
| return new ValueObjectOrError<{{className}}>(Validation.Invalid("The value provided was null")); |
Kind regards,
Ilia
Steps to reproduce
^
Expected behaviour
^
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working