You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately there are small discrepancies in the data obtained through Roslyn API, between CLI and VS extension. VS is doing perfect job in compiling solution, and getting exactly the same results even with the help of Buildalyzer is not easy.
An attribute with a signature with a default value argument, i.e.
public SomeAttribute(string arg1, string arg2 = null)
With the usage
[Some("arg1Value"]
Causes an exception to be thrown when you attempt to access the Arguments property on the IAttribute model.
https://github.com/NeVeSpl/NTypewriter/blob/98fbb168afe3d394862b8bae299c8741853ac968/NTypewriter.CodeModel.Roslyn/Attribute.cs#L46C50-L46C70 is the root cause; defaulted arguments are not included in the ConstructorArguments array.
As a workaround I have just been explicitly passing these parameters in the necessary attributes.
The text was updated successfully, but these errors were encountered: