错误 CS0246:找不到类型或命名空间名称(是否缺少 using 指令或程序集引用?)
error CS0246: The type or namespace name could not be found (are you missing a using directive or an assembly reference?)
我是 .NET Core 和 xUnit 的新手。我想从命令行(CI 管道)运行 xUnit 测试。该项目包含引用的 dll(通过 csproj 文件中的 <PackageReference Include="some_library.dll">
)。当从命令行 运行ning dotnet test
我收到以下错误:
error CS0246: The type or namespace name could not be found (are you missing a using directive or an assembly reference?)
运行 在 VS 中测试没有任何问题。
我如何运行 进行测试,以便在 运行 从 cmd 进行测试时也包含引用的库?
问题在于混合使用 .NET Framework 和 .NET Core 模块。
运行 dotnet test 'path_do_test_dll.dll'
测试成功。
我是 .NET Core 和 xUnit 的新手。我想从命令行(CI 管道)运行 xUnit 测试。该项目包含引用的 dll(通过 csproj 文件中的 <PackageReference Include="some_library.dll">
)。当从命令行 运行ning dotnet test
我收到以下错误:
error CS0246: The type or namespace name could not be found (are you missing a using directive or an assembly reference?)
运行 在 VS 中测试没有任何问题。
我如何运行 进行测试,以便在 运行 从 cmd 进行测试时也包含引用的库?
问题在于混合使用 .NET Framework 和 .NET Core 模块。
运行 dotnet test 'path_do_test_dll.dll'
测试成功。