FluentAssertions 是否支持 .NET Core 2.0 的测试项目?
Does FluentAssertions support Test projects that are .NET Core 2.0?
我有一个 Class 库 (.NET Core 2.0) 正在由 MSTest 测试项目 (.NET Core 2.0) 进行测试。 FluentAssertions 网站说支持 .NET Core 2.0(我从 2.1 退下来了)。它在本地工作,但在构建机器上我收到以下错误:
The nuget command failed with exit code(1) and error(Errors in D:\a\s\ProjectName.Tests.csproj
Package System.Configuration.ConfigurationManager 4.4.0 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package System.Configuration.ConfigurationManager 4.4.0 supports:
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
One or more packages are incompatible with .NETCoreApp,Version=v2.0.)
问题是 Azure DevOps 构建管道使用的是 NuGet 4.1.0。我在 NuGet 还原之前向管道添加了一个名为 NuGet Tool Installer 的任务,并将其设置为安装 4.4.0 版。然后一切正常。谢谢丹尼斯杜门!
我有一个 Class 库 (.NET Core 2.0) 正在由 MSTest 测试项目 (.NET Core 2.0) 进行测试。 FluentAssertions 网站说支持 .NET Core 2.0(我从 2.1 退下来了)。它在本地工作,但在构建机器上我收到以下错误:
The nuget command failed with exit code(1) and error(Errors in D:\a\s\ProjectName.Tests.csproj Package System.Configuration.ConfigurationManager 4.4.0 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package System.Configuration.ConfigurationManager 4.4.0 supports: - net461 (.NETFramework,Version=v4.6.1) - netstandard2.0 (.NETStandard,Version=v2.0) One or more packages are incompatible with .NETCoreApp,Version=v2.0.)
问题是 Azure DevOps 构建管道使用的是 NuGet 4.1.0。我在 NuGet 还原之前向管道添加了一个名为 NuGet Tool Installer 的任务,并将其设置为安装 4.4.0 版。然后一切正常。谢谢丹尼斯杜门!