gpt4 book ai didi

c# - 使用 FluentValidation 的 Release Build 得到错误

转载 作者:行者123 更新时间:2023-11-30 17:48:11 30 4
gpt4 key购买 nike

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

当我在 Debug模式下构建我的项目时,一切都是成功的但是当我使用 Release模式时,找不到 FluentValidation !!!

但是当改成Release模式时 FluentValidation Not found !!!未找到 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 与 Debug 模式,我需要知道为什么 FluentValidation 不在 Release模式下构建(我想发布我的 WCF 主机,但我遇到了问题)

为什么 ??

使用 FluentValidation 库的 Release 和 Debug 模式有何不同?

最佳答案

出于某种原因,您需要从 Debug模式更改为 Release模式,然后通过包管理器控制台重新安装 Fluent,即 PM> install-package FluentValidation

无论如何这对我有用。

关于c# - 使用 FluentValidation 的 Release Build 得到错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23422661/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com