Skip to content

Commit

Permalink
Add .net standard support to AutoFoq (#1184)
Browse files Browse the repository at this point in the history
* Add .net standard support to AutoFoq
* Updated target framework for AutoFoqUnitTest to .NET core 2.2
  • Loading branch information
josh-degraw committed Jun 29, 2020
1 parent c6eecb7 commit 96744a3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
10 changes: 7 additions & 3 deletions Src/AutoFoq/AutoFoq.fsproj
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Common.props" />

<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<AssemblyTitle>AutoFixture.AutoFoq</AssemblyTitle>
<AssemblyName>AutoFixture.AutoFoq</AssemblyName>
<RootNamespace>AutoFixture.AutoFoq</RootNamespace>
Expand Down Expand Up @@ -30,8 +30,12 @@
<Compile Include="AutoFoqCustomization.fs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Foq" Version="[1.5.1,2.0.0)" />
<ItemGroup Condition="'$(TargetFramework)' != 'net452'">
<PackageReference Include="Foq" Version="[1.8.0,2.0.0)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<PackageReference Include="Foq" Version="[1.5.1,2.0.0)" />
<PackageReference Include="FSharp.Core" Version="3.0.2" PrivateAssets="All" />
</ItemGroup>

Expand Down
9 changes: 6 additions & 3 deletions Src/AutoFoqUnitTest/AutoFoqUnitTest.fsproj
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\Common.Test.xUnit.props" />

<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<TargetFrameworks>net452;netcoreapp2.2</TargetFrameworks>
<AssemblyTitle>AutoFixture.AutoFoq.UnitTest</AssemblyTitle>
<AssemblyName>AutoFixture.AutoFoq.UnitTest</AssemblyName>
<RootNamespace>AutoFixture.AutoFoq.UnitTest</RootNamespace>
Expand All @@ -20,12 +20,15 @@
<Compile Include="FixtureIntegrationTest.fs" />
</ItemGroup>

<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<PackageReference Include="Unquote" Version="3.1.0" />
<!-- AutoFoq targets FSharp.Core 3.0.2, but we require 3.1.2 as Unquote was compiled against it. -->
<!-- AutoFoq targets FSharp.Core 3.0.2, but we require 3.1.2 as Unquote was compiled against it for .Net Framework. -->
<PackageReference Include="FSharp.Core" Version="3.1.2" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net452'">
<PackageReference Include="Unquote" Version="4.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AutoFixture\AutoFixture.csproj" />
<ProjectReference Include="..\AutoFoq\AutoFoq.fsproj" />
Expand Down

0 comments on commit 96744a3

Please sign in to comment.