我将项目构建为Debug模式,即FluentValidation是我的库的一部分没问题

当我在调试模式下构建项目时,一切都成功了
但是,当我使用发布模式FluentValidation找不到!!!

但是当将其更改为发布模式FluentValidation找不到!!!找不到AbstractValidator,但出现错误!

The type or namespace name 'FluentValidation' could not be found (are you missing a using directive or an assembly reference?)

The type or namespace name 'AbstractValidator' could not be found (are you missing a using directive or an assembly reference?)


我一般不需要了解Release Vs Debug模式,我不需要知道FluentValidation为什么不以Release模式构建(我想发布WCF主机,但是我有问题)

为什么?

使用FluentValidation库的发布和调试模式之间有什么区别?

最佳答案

由于某些原因,您需要从DeBug更改为Release模式,然后通过Package Manager控制台重新安装Fluent,即PM> install-package FluentValidation

无论如何,这对我有用。

10-08 15:07