我正在尝试F#,并且有一个可以运行dotnet test的小项目,但我想在不安装任何微软的非免费软件的情况下这样做。
使用dotnet的替代方法似乎都使用非常复杂的命令,如:
$ mono packages/xunit.runner.console.2.0.0/tools/xunit.console.exe build/test/CommandLine.Tests.dll作为一个完全的新手,我没有任何提示,这些可能需要调整在我的情况下工作。
我的HelloWorld.fsproj包含:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Compile Include="HelloWorld.fs" />
<Compile Include="HelloWorldTests.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
<PackageReference Include="FsUnit.xUnit" Version="4.0.2" />
</ItemGroup>
</Project>发布于 2020-11-26 11:16:12
Mono和.NET核心都有麻省理工学院的许可证。现在没有理由不使用.NET内核,特别是.NET核心5,它旨在统一.NET核心和Mono的功能。
另外,如果不使用Visual (商业许可证),则项目代码中有不必要的行。
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />https://stackoverflow.com/questions/64978573
复制相似问题