ITNOA
大家好,
我在 Xamarin 表单中使用可移植数据注释,当我部署 UWP 项目并运行它时,我在 PCL 项目和 UWP 项目中添加可移植数据注释时捕获MissingManifestResourceException
(下面添加的异常详细信息)。
我尝试了 Net46-Portable.DataAnnotations 和Portable-Strong.DataAnnotations但不再工作。
我哪里错了?
- 我的 UWP 项目目标版本 Windows 10 周年纪念版(10.0;Build 14393)
- 我的 UWP 项目最低版本 Windows 10 (10.0; Build 10586)
- 我测试的手机是Windows phone 10 周年纪念版。
- Xamarin 表单版本是2.3.4.171-pre1
谢谢
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: