Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3336846
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:11:03+00:00 2026-05-18T00:11:03+00:00

Sometimes, I come across a property that, when I try to rename it using

  • 0

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:

The file ” could not be refactored.
Object reference not set to an
instance of an object.

Do you wish to continue with the
refactoring?

[ ] Ignore further refactoring errors
[ Yes ] [ No ]

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.

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:

private MigrationRequestViewModel Request
{
    get;
    set;
}

I have no problem renaming other properties in the same class in the same file, such as this one:

private MigrationRequestViewModel RequestSnapshot
{
    get;
    set;
}

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:11:04+00:00Added an answer on May 18, 2026 at 12:11 am

    If you just googled the error message you would have found a word-by-word identical copy of your question on CodeProject which was posted already more than half a year ago:

    Obscure Error: The File ” Could Not Be Refactored

    The author of that question filed it on Connect and Microsoft promised to fix it in a future release:

    Thanks for your feedback. We’re aware
    of this issue. This issue will not be
    fixed in any VS2008 patches. Also,
    this issue also exists in Visual
    Studio 2010. However, we will strongly
    consider addressing this issue in a
    future release.

    As a workaround, you may be able to
    get the refactor to work by first
    loading any XAML file that exists in
    your project.

    If you have any other questions or
    issues, feel free to contact me
    directly. My email is ramatthi (at)
    microsoft (dot) com.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

An annoyance that I sometimes come across with SVN is the working copy getting
In reading Haskell-related stuff I sometimes come across the expression tying the knot, I
While looking at online code samples, I have sometimes come across an assignment of
As a developer, I sometimes come across the term 'Critical Path' in the context
Possible Duplicate: Why catch and rethrow Exception in C#? I sometimes come across C#
Sometimes I have to work on code that moves the computer clock forward. In
Sometimes I get Oracle connection problems because I can't figure out which tnsnames.ora file
When drawing strings using drawAtPoint:, drawInRect: and even setting the text property of UILabels
I've just come across these in MVC, and would like to use them instead
Sometimes when I'm editing page or control the .designer files stop being updated with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.