2017-04-13 32 views
2

我有F#的項目,我正在研究VisualStudio2017。我試圖重構代碼並使用內聯,但是這個菜單項不可用。另外,當我點擊重命名什麼也沒有發生。VisualStudio 2017重構不適用於F#

  • 爲什麼不可用?
  • 如何強制重構操作才能正常工作?

enter image description here

let blobToBlobWithInfo (b:IListBlobItem) = 
    try 
     let blobUri = b.Uri.ToString() 
     let blobUriParts = blobUri.Split '/' 
     let t = Array.length blobUriParts 
     let integrationName = blobUriParts.[t-2] 
     if(integrationName <> "LogsToBlobService") then 
      let logTime = new System.DateTime(System.Int32.Parse <| blobUriParts.[t-1].Substring(0,4), System.Int32.Parse <|blobUriParts.[t-1].Substring(4,2), System.Int32.Parse <|blobUriParts.[t-1].Substring(6,2)) 
      Some((b,integrationName,logTime)) 
     else 
      None 
    with 
     | :? System.ArgumentException -> None 
     | _ -> None 

回答

3

這是在Visual Studio中的一個已知問題2017

將固定在更新2

它在這GitHub issue證實。

2

Resharper的重構還是VS2017的正確?如果您只是想重命名,您可以將Visual F#Tools更新至myget的最新版本(將包含在答案中引用的VS更新中):
https://github.com/Microsoft/visualfsharp/wiki/Using-Nightly-Releases-of-the-Visual-F%23-Tools

例如重命名的CSV CSV2在線:用最新版本的VF#工具

enter image description here

enter image description here

更新:

enter image description here

您也可以下載它從這裏: https://dotnet.myget.org/feed/fsharp/package/vsix/VisualFSharp

+0

視覺F#工具不支持的Visual Studio 2017年在這一刻 >作品使用Visual Studio 2013,2015年 https://marketplace.visualstudio.com/items?itemName=FSharpSoftwareFoundation.VisualFPowerTools – burzhuy

+0

@burzhuy你沒有錯,但那是舊的Visual F#Power Tools。這已貶值。現在,F#工具已內置到VS2017中。但是,由於VS2017 RTW的代碼凍結,您獲得的版本有點舊。因此,您應該啓用myget feed並安裝VS F#Tools的最新版本。我將添加我的版本的屏幕截圖。 – s952163

+1

謝謝,但答案僅適用於50%!儘管如此,upvote給你!我已經更新了F#電動工具,但重命名是現在正在工作的唯一一項操作。 'inline'is stil unavailable。 – burzhuy

相關問題