小编HIT*_*IYA的帖子

.Net Framework dll在.Net Standard项目上不起​​作用

我已经将.Net框架 ddl 引用到.Net标准2.0中。它会向我显示以下错误。

System.Reflection.ReflectionTypeLoadException: 'Unable to load one or more of the requested types.
The given assembly name or codebase, '\bin\Debug\netcoreapp2.1\FirstDataBank.DrugServer.API.dll', was invalid.
The given assembly name or codebase, '\bin\Debug\netcoreapp2.1\FirstDataBank.DrugServer.API.dll', was invalid.
The given assembly name or codebase, '\bin\Debug\netcoreapp2.1\FirstDataBank.DrugServer.API.dll', was invalid.
The given assembly name or codebase, '\bin\Debug\netcoreapp2.1\FirstDataBank.DrugServer.API.dll', was invalid.'
Run Code Online (Sandbox Code Playgroud)

相同的ddl在.Net Framework项目上工作正常,但对于.Net标准,它将显示错误。

c# asp.net asp.net-web-api .net-core asp.net-core

3
推荐指数
2
解决办法
101
查看次数

使用流畅验证在 EITHER ... OR ... 情况下允许为空的验证规则

如何在电子邮件或电话号码中编写允许为空的验证规则

RuleFor(x => x.Email).NotEmpty().WithMessage(localizationService.GetResource("ContactUs.Email.Required"));
RuleFor(x => x.PhoneNumber).NotEmpty().WithMessage(localizationService.GetResource("Products.MakeAnOffer.PhoneNumber"));
Run Code Online (Sandbox Code Playgroud)

asp.net validation asp.net-mvc nopcommerce fluentvalidation

0
推荐指数
1
解决办法
2104
查看次数