Note that there are some explanatory texts on larger screens.

plurals
  1. POC# Obscure error: file '' could not be refactored
    primarykey
    data
    text
    <p>Sometimes, I come across a property that, when I try to rename it using the built-in Visual Studio refactoring option, I get a dialog that says:</p> <blockquote> <p>The file '' could not be refactored. Object reference not set to an instance of an object.</p> <p>Do you wish to continue with the refactoring?</p> <p>[ ] Ignore further refactoring errors [ Yes ] [ No ]</p> </blockquote> <p>The dialog actually shows empty apostrophes when referring to the file. Google doesn't provide any help. I'm beginning to think this is an obscure Visual Studio bug and that I should report it to Microsoft Connect. Thought I'd see if any of you have come across it before first.</p> <p>FYI, my solution/projects build fine. The property is not referenced in any XAML. I tried deleting my ".suo" file, my "bin" directory, and my "obj" folder, then rebuilding, but still no dice. I have the latest Microsoft updates. The problem occurs with both Visual C# 2008 Express and Visual Studio 2008 Professional. Though it should not matter, the property looks like this:</p> <pre><code>private MigrationRequestViewModel Request { get; set; } </code></pre> <p>I have no problem renaming other properties in the same class in the same file, such as this one:</p> <pre><code>private MigrationRequestViewModel RequestSnapshot { get; set; } </code></pre> <p>Any ideas? Note that I realize I could just find all reference to the property and manually rename it, but I'd like to get to the bottom of this error dialog.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload