警告测试 运行 将使用为框架 .NETCoreApp、Version=v1.0 和平台 X86 构建的 DLL
Warning Test run will use DLL(s) built for framework .NETCoreApp,Version=v1.0 and platform X86
我想 运行 在 Resharper DotCover 上进行测试,但我的测试项目 dosnet 运行 resharper 测试,但正常的测试资源管理器工作正常。
Warning Test run will use DLL(s) built for framework
.NETCoreApp,Version=v1.0 and platform X86. Following DLL(s) do not
match framework/platform settings. HR.EmployeeContext.Domain.Test.dll
is built for Framework .NETCoreApp,Version=v3.1 and Platform X86. Go
to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more
details on managing these settings.
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
您应该将您的测试版本 CPU 设置更改为任何 CPU,它应该会很好用。
我想 运行 在 Resharper DotCover 上进行测试,但我的测试项目 dosnet 运行 resharper 测试,但正常的测试资源管理器工作正常。
Warning Test run will use DLL(s) built for framework .NETCoreApp,Version=v1.0 and platform X86. Following DLL(s) do not match framework/platform settings. HR.EmployeeContext.Domain.Test.dll is built for Framework .NETCoreApp,Version=v3.1 and Platform X86. Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
您应该将您的测试版本 CPU 设置更改为任何 CPU,它应该会很好用。