Fsharp: Null reference exception when right click and Rename type member in latest RC

Created on 6 Mar 2017  路  12Comments  路  Source: dotnet/fsharp

Right click Rename is broken on my installation of VS2017RC (15.0.26206.0 D15REL). Using it results in a null reference dialog message.

I uninstalled and reinstalled VS, before reproducing again and posting this.

Repro steps

  1. Open VS.
  2. Create a new F# project via: File > New Project > Installed > Templates > Visual F# > Library
  3. Put cursor on member X of type Class1.
  4. Right click and selelct Rename.
  5. Dialog box pops up saying Object reference not set to an instance of an object.

image

Expected behavior

The Rename should allow me to rename and not crash.

Actual behavior

The Rename operation selection crashes.

Known workarounds

None that I know of.

Secondary observation

Clicking Quick Actions and Refactorings..., from the same context menu does absolutely nothing. No action or dialog. Just silence.

Related information

OS is Windows Server 2012 R2 Standard.


My full VS version details
Microsoft Visual Studio Professional 2017 RC
Version 15.0.26206.0 D15REL
Microsoft .NET Framework
Version 4.6.01590

Installed Version: Professional

Visual Basic 2017 RC 00369-50000-00000-AA747
Microsoft Visual Basic 2017 RC

Visual C# 2017 RC 00369-50000-00000-AA747
Microsoft Visual C# 2017 RC

Visual F# 4.1 00369-50000-00000-AA747
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package 8.6.00201.7
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017 15.0.30206.0
ASP.NET and Web Tools 2017

ASP.NET Web Frameworks and Tools 2017 5.2.50127.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 15.0.30126.0
Azure App Service Tools v3.0.0

Common Azure Tools 1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

KofePackagePackage Extension 1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Node.js Tools 1.3.50201.08
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager 4.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools 15.1.61701.270
Microsoft SQL Server Data Tools

TypeScript 2.1.5.0
TypeScript tools for Visual Studio

VsVim 2.3.0.0
VsVim is a Vim emulator for Visual Studio

Most helpful comment

NP @bentayloruk. We'll also have a blog post out which calls out this issue (and others). I'm hoping to have a signed VSIX of the latest master available ASAP so that we can unblock people and get as many of them installing it as possible. Long-term, we're going to have a nightly VSIX that people can install, but for the short-term that "nightly" is actually more stable and complete than the current bits which are shipping in VS 2017.

All 12 comments

This is fixed long, long time ago, even before RC3 I think.

@cartermp Will Rename work in RTW?

OK thanks.

My VS version 15.0.26206.0 D15REL would seem to match up to the latest VF# RC4 release. I am assuming I no longer need to download and install VF# separately and that I should have this latest version via the Visual Studio installer I just ran. If that is correct, then my install is borked with an old version, or I guess Rename is not working currently.

Quick Actions and Refactorings... is also not working (nothing happens when clicked). Two very obvious options from the context menu are not working.

I'm hoping it's just my install. What's the best way to make sure I have the right version?

image

Yes, Rename and Quick Fixes are not working in RC4 because of integration issues that has not been solved in the hurry RC4 release (Rename is not working because we bind to wrong Roslyn packages, Code Fixes are not working because Roslyn team turns them off for F# as VFT team asked them long, long time ago :) )

Everything will work in RTW (RTM), that will be released tomorrow. However, the VFT version that's shipped with it has a number of very, very serious performance bugs and I don't recommend to use it for project of any serious size. Current master branch is good and VFT team has promised to provide separate signed VSIX built from it very soon.

I'm just piping in to confirm that what @vasily-kirichenko said is accurate. The Inline Rename issue was disabled, but it'll be back.

Note that for Quick Actions and Refactorings, I would expect nothing to happen unless there was something to refactor or provide a code fix for. Code fixes are enabled in RC4 and RTW for the following:

  • Generate open statement
  • No uppercase name for Records or DUs
  • Misspelled names
  • Implement Interface
  • Simplify Name

Simplify Name will also be disabled if you use the signed VSIX will be providing out-of-band, since it's very heavy performance-wise. I've personally found it usable for files up to ~800 lines long, but as the projects and files get larger it definitely takes a toll.

Thank you both for bringing me up to speed! Much appreciated. I will update and go again, tomorrow.

NP @bentayloruk. We'll also have a blog post out which calls out this issue (and others). I'm hoping to have a signed VSIX of the latest master available ASAP so that we can unblock people and get as many of them installing it as possible. Long-term, we're going to have a nightly VSIX that people can install, but for the short-term that "nightly" is actually more stable and complete than the current bits which are shipping in VS 2017.

I just installed the RTM version and now get The operation could not be completed. Unspecified error in a dialog box. @cartermp when you said Rename was disabled, did you mean in RTM too?


VS info
Microsoft Visual Studio Professional 2017
Version 15.0.26228.4 D15RTWSVC
Microsoft .NET Framework
Version 4.6.01590

Installed Version: Professional

Visual Basic 2017 00369-60000-00001-AA768
Microsoft Visual Basic 2017

Visual C# 2017 00369-60000-00001-AA768
Microsoft Visual C# 2017

Visual F# 4.1 00369-60000-00001-AA768
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package 8.6.00209.10
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017 15.0.30223.0
ASP.NET and Web Tools 2017

ASP.NET Web Frameworks and Tools 2017 5.2.50127.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 15.0.30209.0
Azure App Service Tools v3.0.0

Common Azure Tools 1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

JetBrains ReSharper Ultimate 2016.3.2 Build 107.0.20170126.120331
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright 漏 2017 JetBrains, Inc.

KofePackagePackage Extension 1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Node.js Tools 1.3.50201.08
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager 4.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools 15.1.61702.140
Microsoft SQL Server Data Tools

TestDriven.Net 4.0-beta3
Zero friction testing for Visual Studio

TypeScript 2.1.5.0
TypeScript tools for Visual Studio

VsVim 2.3.0.0
VsVim is a Vim emulator for Visual Studio

@bentayloruk Yes, it's also disabled in RTM.

Understood.

Just as an FYI, we'll have a blog post out later today with the following statement in it:

Note: Inline Rename is temporarily disabled due to a last-minute bug which caused the IDE to crash. The fix has already been completed and the feature will work in a future VS 2017 update.

It's unfortunate because it's a feature which was never in-box before (available only through Visual F# Power Tools), but now that the menu item is there it's super visible and likely one of the first things people will try.

Yes, it is unfortunate. It's a shame about the error message text too, it seems like a crash in itself. Ah well, onwards and upwards!

@bentayloruk NRE is raised by Roslyn when it cannot find inline rename service.

Was this page helpful?
0 / 5 - 0 ratings