Closed sergey-tihon closed 5 years ago
@Szer proposed an idea for workaround, that we should not only import props file
<Import Project="..\..\netfx.props" />
but also add it as a resource
<ItemGroup>
<None Include="..\..\netfx.props" />
...
</ItemGroup>
as a result, MyProvider.Tests.fsproj
will look like this
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\netfx.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<None Project="..\..\netfx.props" />
<None Include="app.config" />
<Compile Include="MyProvider.Tests.fs" />
<None Include="paket.references" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0"/>
<ProjectReference Include="..\..\src\MyProvider.Runtime\MyProvider.Runtime.fsproj">
<Name>MyProvider.Runtime</Name>
<Project>{7e90d6ce-a10b-4858-a5bc-41df7250cbca}</Project>
<Private>True</Private>
</ProjectReference>
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
Looks like my mistake, I downloaded latest version (5.0.0) from NuGet on Windows manually and it does not containt netfx.props
. This means that we need to release new version of template...
Confirm that it works OK with NuGet package created manually from /templates
folder.
Fixed in v5.1.0
Thank you @sergey-tihon !
Description
TP created from the template does not build on
macOS
/mono
.Repro steps
Please provide the steps required to reproduce the problem
dotnet new -i FSharp.TypeProviders.Templates
dotnet new typeprovider -n LemonadeProvider -lang F#
cd LemonadeProvider
mono .paket/paket.exe update
dotnet build -c release
Expected behavior
Project should compile
Actual behavior
Analysis
This is looks very strange for me, because
fsharp.typeproviders.templates.5.0.0.nupkg
containsnetfx.props
file andfsproj
files import it.but
dotnet new typeprovider -n LemonadeProvider -lang F#
creates a folder withoutnetfx.props
and without imports.Related information
macOS Mojave (10.14)
.NET Core 2.1.401
,Mono 5.12.0.301