Fsharp: FSharp.Compiler.Tools 4.1.34 is broken

Created on 16 Feb 2018  路  17Comments  路  Source: dotnet/fsharp

After paket update FSharp.Compiler.Tools the following line has disappear from all F# projects in the solution, which resulted with non-compilable one:

<Import Project="..\..\packages\FSharp.Compiler.Tools\build\FSharp.Compiler.Tools.props" Condition="Exists('..\..\packages\FSharp.Compiler.Tools\build\FSharp.Compiler.Tools.props')" Label="Paket" />

Rolling back to 4.1.29 solves the problem.

Most helpful comment

so how do we progress?

All 17 comments

Do you have any more details on this, e.g. which project were you upgrading?

AFAICS that package has never had a props file, see https://github.com/fsharp/fsharp/blob/master/FSharp.Compiler.Tools.Nuget/FSharp.Compiler.Tools.nuspec.

Was a .targets line also removed from your project file? If so, that would give us something specific to look into.

  1. Create a .net 4.6.2 console project in VS
  2. paket convert-from-nuget
  3. Cleanup paket.dependencies, that it looks like this:
framework: net462

source https://api.nuget.org/v3/index.json

nuget FSharp.Core
nuget FSharp.Compiler.Tools
  1. Cleanup paket.references so that it looks like this:
FSharp.Core
FSharp.Compiler.Tools
  1. paket install
  2. Inspect the project file.

4.1.34:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>a1518212-423a-4fc0-9d0d-e2c4632b675c</ProjectGuid>
    <OutputType>Exe</OutputType>
    <RootNamespace>ConsoleApplication14</RootNamespace>
    <AssemblyName>ConsoleApplication14</AssemblyName>
    <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <UseStandardResourceNames>true</UseStandardResourceNames>
    <TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
    <Name>ConsoleApplication14</Name>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <Tailcalls>false</Tailcalls>
    <OutputPath>bin\$(Configuration)\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <WarningLevel>3</WarningLevel>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <Tailcalls>true</Tailcalls>
    <OutputPath>bin\$(Configuration)\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <WarningLevel>3</WarningLevel>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup>
    <MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
  </PropertyGroup>
  <Choose>
    <When Condition="'$(VisualStudioVersion)' == '11.0'">
      <PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') ">
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </When>
    <Otherwise>
      <PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets') ">
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </Otherwise>
  </Choose>
  <Import Project="$(FSharpTargetsPath)" />
  <ItemGroup>
    <Compile Include="AssemblyInfo.fs" />
    <Compile Include="Program.fs" />
    <None Include="App.config" />
    <None Include="paket.references" />
  </ItemGroup>
  <ItemGroup>
    <Reference Include="mscorlib" />
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Numerics" />
    <Reference Include="System.ValueTuple">
      <HintPath>..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
      <Private>True</Private>
    </Reference>
  </ItemGroup>
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
  <Choose>
    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.2'">
      <ItemGroup>
        <Reference Include="FSharp.Core">
          <HintPath>..\packages\FSharp.Core\lib\net45\FSharp.Core.dll</HintPath>
          <Private>True</Private>
          <Paket>True</Paket>
        </Reference>
      </ItemGroup>
    </When>
  </Choose>
</Project>

4.1.29:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\packages\FSharp.Compiler.Tools\build\FSharp.Compiler.Tools.props" Condition="Exists('..\packages\FSharp.Compiler.Tools\build\FSharp.Compiler.Tools.props')" Label="Paket" />
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>a1518212-423a-4fc0-9d0d-e2c4632b675c</ProjectGuid>
    <OutputType>Exe</OutputType>
    <RootNamespace>ConsoleApplication14</RootNamespace>
    <AssemblyName>ConsoleApplication14</AssemblyName>
    <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <UseStandardResourceNames>true</UseStandardResourceNames>
    <TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
    <Name>ConsoleApplication14</Name>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <Tailcalls>false</Tailcalls>
    <OutputPath>bin\$(Configuration)\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <WarningLevel>3</WarningLevel>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <Tailcalls>true</Tailcalls>
    <OutputPath>bin\$(Configuration)\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <WarningLevel>3</WarningLevel>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup>
    <MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
  </PropertyGroup>
  <Choose>
    <When Condition="'$(VisualStudioVersion)' == '11.0'">
      <PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') ">
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </When>
    <Otherwise>
      <PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets') ">
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </Otherwise>
  </Choose>
  <Import Project="$(FSharpTargetsPath)" />
  <ItemGroup>
    <Compile Include="AssemblyInfo.fs" />
    <Compile Include="Program.fs" />
    <None Include="App.config" />
    <None Include="paket.references" />
  </ItemGroup>
  <ItemGroup>
    <Reference Include="mscorlib" />
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Numerics" />
    <Reference Include="System.ValueTuple">
      <HintPath>..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
      <Private>True</Private>
    </Reference>
  </ItemGroup>
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
  <Choose>
    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.2'">
      <ItemGroup>
        <Reference Include="FSharp.Core">
          <HintPath>..\packages\FSharp.Core\lib\net45\FSharp.Core.dll</HintPath>
          <Private>True</Private>
          <Paket>True</Paket>
        </Reference>
      </ItemGroup>
    </When>
  </Choose>
</Project>

So 4.1.34 does not add the line which imports the props:

<Import Project="..\packages\FSharp.Compiler.Tools\build\FSharp.Compiler.Tools.props" Condition="Exists('..\packages\FSharp.Compiler.Tools\build\FSharp.Compiler.Tools.props')" Label="Paket" />

which results with non compilable project (unless you have F# SDK installed, which is a rare case).

@dsyme Yes that looks like a packaging error:

image

We should consider unlisting that version

We should consider unlisting that version

After I noticed this now as well (thanks @vasily-kirichenko otherwise I would have searched a while). As this basically renders the package unusable I change my wording to "we should unlist immediately"... @dsyme

馃憤 for unlisting. I had to pin it to 4.1.29 for now.

Unlist what exactly?

Ok unlisted 4.1.34

so how do we progress?

@forki lets go travelling. What about Tokio?

OK, thanks, you're right.

However just to let you know that the this (community) package will no longer contain the version of the compiler to execute with .NET Core, since the F# compiler is now part of the .NET SDK. (Previous versions of the package were shipping an old compiler to execute on .NET Core and it's not sustainable nor necessary to have the community build and package the .NET Core version of the compiler in a nuget package as well)

In the process of removing that support I also inadvertently removed the props file.

I'll bump the major version of the package as a result, to 10.0.1 or something, see https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1004-versioning-plan.md

Closing in favour of https://github.com/fsharp/fsharp/issues/821 since this is a community package whose authoring is in that repo

Fixed in FSharp.Compiler.Tools 10.0.1 (packagings of F# tooling will no longer use the F# language version in their numbering schemes, see https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1004-versioning-plan.md)

@dsyme any plans to publish FCS package as well? I'm hungry to see the awesome "the value of the expression of type xxx was ignored" :)

@vasily-kirichenko Will work on it.

@vasily-kirichenko new FCS 20.0.1 published with all the bits from visualfsharp master

@dsyme thank you.

Was this page helpful?
0 / 5 - 0 ratings