为什么dotnet-fantomas需要FSharp.Core,版本= 4.4.1.0?

时间:2018-05-08 11:49:02

标签: f# nuget lint

尝试dotnet-fantomas工作,我从Fantomas安装了dotnet-fantomasNuget并添加了行

<ItemGroup>  
    <DotNetCliToolReference Include="dotnet-fantomas" Version="2.7.1" />
</ItemGroup>

到我的.fsproj文件。然后我将安装了dotnet-fantomas.exe的文件夹添加到Windows路径。

接下来,我在包含一些.fs文件的文件夹中打开了一个命令提示符,并尝试运行

dotnet-fantomas Asset.fs --force

我收到了以下错误消息。 dotnet-fantomas要求FSharp.Core, Version=4.4.1.0FSharp.Core版本为4.3.4。浏览Nuget Package Manager这是可用的最新版本。我的项目以4.4.3.0为目标运行时,.NET Framework 4.6.1为目标框架。

我错过了什么?

C:\Projects\bitbucket3\VSProjects\Fractal13\Fractal13>dotnet-fantomas Asset.fs --force
The following exception occurs while formatting stdin: System.IO.FileLoadException: Could not load file or assembly 'FSharp.Core, Version=4.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'FSharp.Core, Version=4.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at Fantomas.CodeFormatterImpl.createFormatContextNoChecker(String fileName, String source)
   at Fantomas.CodeFormatter.FormatDocument(String fileName, String source, FormatConfig config)
   at Fantomas.Cmd.Program.processSourceString(Boolean isFsiFile, String s, TextWriter tw, FormatConfig config)
   at Fantomas.Cmd.Program.stringToFile@185(FSharpRef`1 force, FSharpRef`1 profile, FSharpRef`1 fsi, String s, String outFile, FormatConfig config)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Force writing original contents to Asset.fs.

0 个答案:

没有答案