F#Visual Power Tools不起作用 [英] F# Visual Power Tools doesn't work

查看:87
本文介绍了F#Visual Power Tools不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 F#。对于 VS2015 解决方案中的所有项目,我都希望具有类似的代码样式。我已经安装了

I'm trying to work with F#. For all projects in VS2015 solution i want to have similar code style. I have installed

根据此配置(逗号后的空格),以下代码:

According to this configuration (space after comma) the following code:

fun unit ->Log.Information( "Found: {category}\\{name}\\{instance}",category,name,instance )

应转换为:

fun unit ->Log.Information( "Found: {category}\\{name}\\{instance}", category, name, instance )

但是当我尝试通过按编辑->高级->格式化文档什么都没发生。

But when i'm trying to format documment by pressing Edit->Advanced->Format Document nothing happend.

如何格式化我的代码?

更新1

当我tr y格式化代码,格式化失败后,我收到验证。保留原始内容。消息:

我试图搜索此问题,并发现此问题
可能会遇到这种问题,并且知道如何解决?

When i try to format the code i receive Validation after formatting failed. The original content is preserved. message: I tried to search about this problem, and found this issue. May be some one faced with such problem and know how to fix it?

推荐答案

尝试使用名称空间。以下代码未格式化:

Try using namespaces. Below code does not format:

module Deck
type Color = 
    | Red
    | Green
    | Blue
    | Yellow

但是,下一个格式正确

namespace Dummy

    module Deck = 
        type Color = 
            | Red
            | Green
            | Blue
            | Yellow

这篇关于F#Visual Power Tools不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆