Reputation: 5224
This is my first time using .NET Standard
and I'm confused. All I want to do is add an annotation like this. I need to target .NET Framework 4.5.2
, so I selected version 1.0
. The reference is missing, so I need to add the it, but can't find it like I normally would in the not to distant past.
[XmlElement(ElementName = "CreatedBy")] // No good
public string CreatedBy { get; set; }
Upvotes: 2
Views: 239
Reputation: 545
I don't believe that you can use XmlElement
if you're targeting Standard 1.0. Going by the version diffs, it looks like it was made available in 2.0. You might, unfortunately, be out of luck in this case if you need XmlElement
and target 4.5.2. Probably would have to make .NET Framework library instead.
If you check out the .NET Standard version page you can click on the different versions of Standard. Those links take you to the GitHub page for each release so you can see all the APIs that are included in that release along with a diff with the previous version so you can see what's added.
Upvotes: 2