fsprojects / FSharp.TypeProviders.SDK

The SDK for creating F# type providers
https://fsprojects.github.io/FSharp.TypeProviders.SDK/
MIT License
298 stars 94 forks source link

Changed location of F# SDK in Visual Studio 15.8 leads to compilation errors #249

Closed bartsokol closed 6 years ago

bartsokol commented 6 years ago

Description

In Visual Studio version 15.8 F# SDK was moved inside the installation directory of the VS, so the paths provided in the fsc.props file don't point to SDK any more. Thus solving issue with type providers and .NET Core SDK decribed here requires adding new paths.

One problem is that now the path is dependent on the variant of the VS installed (Community vs Professional vs...), so there needs to be a path added for each variant in use.

Repro steps

Expected behavior

Code compiles.

Actual behavior

Compilation ends with error.

Known workarounds

Put new path to SDK in local props file (e.g. Directory.build.props) for all variants of Visual Studio that are in use in your organization. For Community variant it would be:

  <PropertyGroup Condition="'$(IsWindows)' == 'true' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe')">
    <FscToolPath>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp</FscToolPath>
    <FscToolExe>fsc.exe</FscToolExe>
  </PropertyGroup>

Related information

dsyme commented 6 years ago

Fixed in fsc.props