与早期beta(dnx)天的this question类似,我试图将代码移植到.net core 1.0 rtm,并且代码在以下单元中回复,其中包含诸如ValidationAttribute类型和其他内容:无法在.net核心1.0中使用数据注释
using System.ComponentModel.DataAnnotations;
namespace Hl7.Fhir.Introspection
{
[AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
public sealed class FhirElementAttribute : ValidationAttribute
...
如何将此类代码移植到dotnet core 1.0 rtm?
一些早期的测试版日期表明单元名称已更改为System.ComponentModel.Annotations,但这不起作用。 –
你有没有试过[this](https://www.nuget.org/packages/System.ComponentModel.Annotations/4.1.0-rc2-24027)? – lokusking
哦,这是预发布位,但不是一个dotnet-RC2级别的位 –