ITNOA
大家好,
我在Xamarin表单中使用portable data annotations,当我部署UWP项目并运行它时,我抓住了MissingManifestResourceException
(下面添加的例外细节),同时我添加了便携式数据注释PCL项目和UWP项目都是。
我尝试Net46-Portable.DataAnnotations 和Portable-Strong.DataAnnotations但不再有效。
我哪里错了?
由于
System.Resources.MissingManifestResourceException occurred
HResult=-2146233038
Message=Unable to load resources for resource file "System.ComponentModel.DataAnnotations.Resources.DataAnnotationsResources" in package "ResaDoctorApp".
Source=mscorlib
StackTrace:
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at System.ComponentModel.DataAnnotations.Resources.DataAnnotationsResources.get_EmailAddressAttribute_Invalid()
at System.ComponentModel.DataAnnotations.EmailAddressAttribute..ctor()
at System.RuntimeTypeHandle.CreateCaInstance(RuntimeType type, IRuntimeMethodInfo ctor)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType)
at System.Reflection.RuntimePropertyInfo.GetCustomAttributes(Type attributeType, Boolean inherit)
at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
at System.Attribute.GetCustomAttributes(MemberInfo element, Boolean inherit)
at System.Reflection.CustomAttributeExtensions.GetCustomAttributes(MemberInfo element, Boolean inherit)
at AutoMapper.Configuration.MappingExpression`2.Configure(IProfileConfiguration profile, TypeMap typeMap)
at AutoMapper.Profile.BuildTypeMap(TypeMapRegistry typeMapRegistry, ITypeMapConfiguration config)
at AutoMapper.Profile.AutoMapper.IProfileConfiguration.Register(TypeMapRegistry typeMapRegistry)
at AutoMapper.MapperConfiguration.Seal(IConfiguration configuration)
at AutoMapper.MapperConfiguration..ctor(MapperConfigurationExpression configurationExpression, IEnumerable`1 mappers)
at AutoMapper.Mapper.Initialize(Action`1 config)
at DoctorApp.Models.Doctor.FillFromFather(DoctorPreview preview)
InnerException: