Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

Commit 66de9a6

Browse files
DalSoftstajs
authored andcommitted
Added documentation for running SpecFlowNetCore cross platform (#75)
1 parent c233779 commit 66de9a6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,30 @@ Update your project:
6666

6767
Note: there is [a bug with the .NET Core CLI requiring a second build for newly added files to be discovered](https://github.com/stajs/SpecFlow.NetCore/issues/22).
6868

69+
## Cross platform using Mono
70+
71+
This has been tested on Windows, Ubuntu and macOS (High Sierra). It works in exactly the same way except it doesn’t use DotNetCli because it doesn’t work cross platform. Instead we call dotnet-SpecFlow.NetCore.exe directly from the package, this is why we need an extra PackageReference to SpecFlow.NetCore.
72+
73+
**You also need to reference SpecFlow 2.2 or higher due to a [Mono specific bug in SpecFlow](https://github.com/techtalk/SpecFlow/issues/701).**
74+
75+
```xml
76+
<PropertyGroup>
77+
<SpecFlowNetCoreVersion>1.3.2</SpecFlowNetCoreVersion>
78+
</PropertyGroup>
79+
80+
<ItemGroup>
81+
<PackageReference Include="SpecFlow.NetCore" Version="$(SpecFlowNetCoreVersion)" />
82+
83+
<PackageReference Include="SpecFlow" Version="2.2.0" />
84+
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
85+
<PackageReference Include="xunit" Version="2.2.0" />
86+
</ItemGroup>
87+
88+
<Target Name="PrecompileScript" BeforeTargets="BeforeBuild">
89+
<Exec Command="$(NuGetPackageRoot)specflow.netcore/$(SpecFlowNetCoreVersion)/lib/$(TargetFramework)/dotnet-SpecFlow.NetCore.exe" />
90+
</Target>
91+
```
92+
6993
## .NET Core &amp; target frameworks
7094

7195
SpecFlow itself is currently limited to Windows platforms with full .NET Framework v4.5.1+. This means that two of the most common [target frameworks](https://docs.microsoft.com/en-us/dotnet/standard/frameworks) are unsupported:

0 commit comments

Comments
 (0)