首页 > 解决方案 > Visual Studio 2019 xUnit 测试错误 CS0246

问题描述

我正在尝试创建单元测试,在使用 xUnit 测试模板添加新项目后,我添加了对要测试的项目的引用。我一直遇到这个错误。

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

我已经定义了 Book,所以我不确定为什么会出现这个错误。

标签: c#unit-testingvisual-studio-2019

解决方案


推荐阅读