C
C#16mo ago
Foxtrek_64

❔ Net461 Needs Reference to NetStandard 2.0

I'm encountering an error that only gets thrown when executing an app. Building works great. The error says that System.ValueType is not defined and I need a reference to netstandard 2.0.0. I am not using anything that relies on netstandard, nor do I know of anywhere that I'm using System.ValueType, yet my app seems to think I am. Any thoughts of where I might look? I would just add a reference as suggested, but I don't have a .csproj. I have a project.json file which only supports nuget.
2 Replies
Foxtrek_64
Foxtrek_6416mo ago
I think I tracked it down One workflow returns Nullable<DateTimeOffset>. I imagine T in Nullable<T> likely has a constraint on System.ValueType I'll need to find some alternative to DateTimeOffset?. I return null if the invoice does not have a purchase date (that is, it's not paid), or a DateTimeOffset if it has been paid. I suppose I could use DateTimeOffset.MinValue since that will never be a valid date. Nope, that wasn't quite it but I'm too lazy to put it back now. That was painful Ok so the plot thickens... I started removing code to see when it stops erroring. Using a switch statement results in the same error, but for System.Object rather than System.ValueType
Accord
Accord16mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.